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: Delete records

Re: Delete records

From: Jurij Modic <jurij.modic_at_mf.sigov.mail.si>
Date: 1998/02/09
Message-ID: <34df9504.49212413@www.sigov.si>#1/1

On Mon, 09 Feb 1998 18:25:37 +0100, Casper Thrane <ct_at_infoaccess.dk> wrote:

>Hi!
>
>I have got this problem.
>I have to delete all records from one table that doesn't exist in two
>other tables.
> ....[SNIP].....
>I want to delete all records from table 1 that has been left over, if
>you combine table 2 and table 3. This means in this case, that I want to
>delete id 1 and 4.

DELETE FROM table_1 WHERE id NOT IN
  (SELECT id FROM table_2
   UNION ALL
   SELECT id FROM table_3);

>
>Casper Thrane

Regards,


Jurij Modic                             Republic of Slovenia
jurij.modic_at_mf.sigov.mail.si		Ministry of Finance
============================================================
The above opinions are mine and do not represent any official standpoints of my employer Received on Mon Feb 09 1998 - 00:00:00 CST

Original text of this message

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