Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Query Help please
>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