Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Complex Oracle delete SQL statement?
Brad Pybus wrote:
>
> I can do this statement in SQL Server but I can not figure out how to do it
> in Oracle. I just want it to delete records in Table1.
>
> DELETE A
> FROM TABLE1 A, TABLE2 B, TABLE3 C
> WHERE A.MYKEY= B.MYKEY AND A.UNIQUEKEY = B.UNIQUEKEY
> AND B.MYKEY= C.MYKEY
> AND C.KEY1 NOT BETWEEN 'A' AND 'Z';
With the appropriate primary keys in place you can issue
delete from
( select ...
from )
otherwise you'll need a 'where ... in ( subquery)'
hth
connor
-- ============================== Connor McDonald http://www.oracledba.co.uk "Some days you're the pigeon, some days you're the statue..."Received on Thu Aug 22 2002 - 12:04:52 CDT