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: "Not in" subquery

Re: "Not in" subquery

From: colmkav <colmjkav_at_yahoo.co.uk>
Date: Thu, 07 Jun 2007 00:52:39 -0700
Message-ID: <1181202759.574680.135480@p77g2000hsh.googlegroups.com>


Are you sure you get the same results?

I have just tried to apply the same logic to my query and get no data using the not exists method. WHat have I dont wrong?

query1:

select strategy from t_bookmap where strategy not in (select strategy from ta_strategy where SourceId = 1)

query2:

select strategy from t_bookmap where not exists (select strategy from ta_strategy where SourceId = 1)

On 7 Jun, 00:07, ACMIC <AACARMICH..._at_THEBLUEZONE.NET> wrote:
> insead of using not in use not exists.... this is alot faster....
>
> SELECT . . .
> FROM emp E
> WHERE NOT EXISTS ( SELECT X'
> FROM dept
> WHERE dept_no = E.dept_no
> AND dept_cat = 'A' );
Received on Thu Jun 07 2007 - 02:52:39 CDT

Original text of this message

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