Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: "Not in" subquery
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