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: C Chang <cschang_at_maxinter.net>
Date: Wed, 24 Oct 2001 23:17:49 -0400
Message-ID: <3BD7845D.55A4@maxinter.net>


TurkBear wrote:
>
> Try
> select a from A_Table
> minus
> select a from B_table
>
> This will give you all a from A_table NOT in B_table
>
> C Chang <cschang_at_maxinter.net> wrote:
>
> >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
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> Check out our new Unlimited Server. No Download or Time Limits!
> -----== Over 80,000 Newsgroups - 19 Different Servers! ==-----
Which Proccess is more efficient?

select a from A_Table
minus
select a from B_table

or

select a from test1
where not exists
(select 1 from test2
  where test1.a = test2.b)

C Chang Received on Wed Oct 24 2001 - 22:17:49 CDT

Original text of this message

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