Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Delete records
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
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
![]() |
![]() |