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: SQL Query Help please

Re: SQL Query Help please

From: DanHW <danhw_at_aol.com>
Date: 19 Oct 1998 01:43:55 GMT
Message-ID: <19981018214355.14847.00002927@ng115.aol.com>


>Dear All,
>
>I have the following select:
>
>Select account_no from table1
>where account_no not in (select account_no from table2).
>
>I am trying to say that give me the account_no's in table1 that are not in
>table2.
>

The easist way is to use the MINUS set operator...

SELECT ACCOUNT_NO FROM TABLE_1
MINUS
SELECT ACCOUNT_NO FROM TABLE_2. You get those in table_1 that are not in table_2.

Dan Hekimian-Williams Received on Sun Oct 18 1998 - 20:43:55 CDT

Original text of this message

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