Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Complex Oracle delete SQL statement?

Re: Complex Oracle delete SQL statement?

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Thu, 22 Aug 2002 18:04:52 +0100
Message-ID: <3D6519B4.6D7A@yahoo.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US