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: Why the "where NOT EXISTS" does not work?

Re: Why the "where NOT EXISTS" does not work?

From: Marc <langkamp_at_mailcity.com>
Date: Wed, 24 Oct 2001 15:34:49 +0200
Message-ID: <3bd6c37a$1@gaspra.oss.akzonobel.nl>


Try this

select a from test1
where not exists (select 1 from test2

                              where test1.a = test2.b)

Values in test1.a :(1,2,3,4)
Values in test2.b :(1,4)

result

        A


        2
        3

Hth

Marc

N.B.
If any value is found it will

"C Chang" <cschang_at_maxinter.net> wrote in message news:3BD63329.BC8_at_maxinter.net...
> I have 2 tables say A_table, B_table. They both have some common
> columns. The A_Table has some rows that with the column not appearing
> in B_table. I tried to use following to find out what appears in
> A_talbe but not in B_table.
> select a
> from A_table
> where NOT EXISTS
> ( select a
> from B_table
> where ..);
> and it always return 0 row. What went wrong? Need Help Thanks.
>
> C Chang
Received on Wed Oct 24 2001 - 08:34:49 CDT

Original text of this message

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