Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL join to identify missing records?
Assuming you have two tables joined by column id:
table1(id, ...)
table2(id, ...)
the records in table1 that are not in table2 are given by:
select distinct id from table1
minus
select distinct id from table2
/
-- Have a nice day Michel Susie Grace <hlng_at_usa.net> a écrit dans le message : 8o25cv$a4i$1_at_nnrp1.deja.com...Received on Thu Aug 24 2000 - 02:37:59 CDT
> I have 2 tables that are joined, and want to identify records that are
> in table1 but NOT in table2?
>
> What is the sample syntax?
>
> Thanks in advance.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.