Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie: delete from multiple tables?
"abhijit" <abhi_at_nomail.com> wrote in message
news:3F16AEB4.70802_at_nomail.com...
> delete table_1
> where table_1.field1 in (select table_2.field1 from table_2 )and
> table_1.field2 in (select table_2.field2 from table_2)
Won't that potentially delete rows where one field matches but not the other?
So...
table_1:
field1: 1
field2: 2
field1: 3
field2: 4
And table_2:
field1: 1
field2: 7
field1: 9
field2: 2
I -believe- (happy to be proved wrong...) that your statement above would match a row as table_1's field1 is in (1, 9) and table_1's field2 is in (7, 2). However, no row -should- be matched as no row in table_2 has a fields identical to those in table_1.
That not the case?
Cheers,
Ian
Received on Thu Jul 17 2003 - 09:25:17 CDT
![]() |
![]() |