NOT EXISTS and NOT Operator
From: raja <dextersunil_at_gmail.com>
Date: Thu, 19 Jul 2012 06:36:31 -0700 (PDT)
Message-ID: <edbda220-d8a0-492d-8ef6-32b7887cbf52_at_googlegroups.com>
Hi All,
Date: Thu, 19 Jul 2012 06:36:31 -0700 (PDT)
Message-ID: <edbda220-d8a0-492d-8ef6-32b7887cbf52_at_googlegroups.com>
Hi All,
Can someone please help me on the below doubts in Oracle 8.1.7 : 1. How does NOT EXISTS and NOT Operator work in the below query. Its confusing, please explain me the functionality over here in detail? 2. since not exists is not recommended to be used and not operator too. please suggest me the list of methods that this query can be re-written to improve the query performance!!??
select
'value1', value2
from table2 t1
where t1.col2 = 'X'
and not exists
(
select null
from table2 t2
where
t2.col3 <> 'Y'
and t1.col1 = t2.col1
);
Thanks in Advance.
With Regards,
Raja.
Received on Thu Jul 19 2012 - 08:36:31 CDT