In oracle why "Not in" doesn't work on null values but "IN" works For eg
with temp(n,p) as (
select 1,2 from dual union all
select 3,2 from dual union all
select 4,6 from dual union all
select 5,6 from dual union all
select 2,8 from dual union all
select 6,8 from dual union all
select 8,null from dual
)
1. Select * from temp where n in (2,6,8,null);
2. Select * from temp where n not in (2,6,8,null);
First Statement will give the output = 2,6,8 Second statement will not give any output
Can someone please explain why?