Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Query Help please
You might need to alias your tables:
SELECT a.account_no
FROM table1 a
WHERE a.account_no NOT IN (SELECT b.account_no
FROM table2 b)/
Wil
MUJAHID HAMID wrote:
> 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.
>
> In the result I do not get any rows back and I know for a fact that there
> are rows in table1 that are not in table2.
> (Table2 has more rows than table1)
>
> Thanks in advance
> mujahid_at_pharmco.demon.co.uk
Received on Sun Oct 18 1998 - 14:45:00 CDT