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: Chris Colclough <chris.colclough_at_jhuapl.edu>
Date: 1998/02/09
Message-ID: <34DF3FDF.1383F194@jhuapl.edu>#1/1

Try this:

select id
from table_1 t1
where not exists

    (select 'x'

     from table_2 t2
     where t2.id = t1.id)
and not exists
     (select 'x'
     from table_2 t2

    where t2.id = t1.id)

Casper Thrane wrote:

> Hi!
>
> I have got this problem.
> I have to delete all records from one table that doesn't exist in two
> other tables.
> 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.
>
> Casper Thrane
Received on Mon Feb 09 1998 - 00:00:00 CST

Original text of this message

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