Hi All ,
I am want optimize the sql where i have to find the column(join of two column) present in one table(tab1) but not in other(tab2). I tried something like this but it is showing me zero rows.
SELECT COL1||COL2
FROM TAB1 e
where NOTÂ exists
(
select 1 from TAB2 rd
join TAB1 e on e.COL1||e.COL2=RD.COL1||RD.COL2
)
When i use the simple sql(which takes hell lot of time) i am getting correct output:0
SELECT COL1||COL2
FROM TAB1 e
where COL1||COL2 not in
(
select COL1||COL2 from TAB2 rd
)
What is wrong in 'NOT EXISTS' query,or suggest me better way to achieve same. Thanks!