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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Deleting records where they are in another table

Re: Deleting records where they are in another table

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 30 May 2006 07:06:24 -0700
Message-ID: <1148997984.574265.96190@i39g2000cwa.googlegroups.com>


Andrew, I do not believe that the ANSI standard supports joins in the where clause of update or delete statements.

You can do the following (based on your problem description) delete from A where (col1, col2) in (select col1, col2 from B )

Run the sub-select first and note the count of rows returned. Then make sure the delete count matches, else issue a rollback and take another look at the statement.

HTH -- Mark D Powell -- Received on Tue May 30 2006 - 09:06:24 CDT

Original text of this message

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