Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Select query that will tell me accounts in table A that are NOT in table B?

Re: Select query that will tell me accounts in table A that are NOT in table B?

From: Default <Daniel.Morgan_at_attws.com>
Date: Fri, 08 Jun 2001 15:08:18 -0700
Message-ID: <3B214CD2.F79E03AB@attws.com>

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

Original text of this message

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