Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> 2 Dumb newbee questions
Hallo!
I know a little about SQL but I stumbled over code on an oracle server which I don't understand:
create table foo as
select no, um
from bar
where 1=2
As far as I get it, this creates the new table foo with the colums no and um which have the same types as the colums with the same name in the table bar. But what is this "where 1=2" ???
And one last:
update
(
select
ck.col_1,
ck.col_2,
col_3,
ck.col_4,
col_5
from foo i, bar ck
where i.col_1 = ck.col_1 and i.col_2 = ck.col_2
col_2 = col_5
How do I see in this construct which table is updated? The inner select statement returns 5 columns, but only 2 get updated, so what's the point of this select?
Thanx in advance for any help!!!
Ciao
matthias
Received on Fri Jul 16 2004 - 15:27:10 CDT