Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Select query that will tell me accounts in table A that are NOT in table B?
susie grace wrote:
> Hi,
>
> I'm looking for the syntax that will show me which accounts exist in table A,
> but are NOT in table B.
>
> Thanks for the assist.
SELECT account_no
FROM table_a
MINUS
SELECT account_no
FROM table_b;
You an use NOT IN or NOT EXISTS but MINUS is faster.
Daniel A. Morgan Received on Fri Jun 08 2001 - 17:08:18 CDT