I\'m using Postgres with this query
select
*
from Entity this_
where
(this_.ID not in (null))
Why does this give me no results? I would expe
I had similar problem. My ego that I knew SQL well, got punctured. Here is the simplified example from scott/tiger tables.
select empno, ename from emp where deptno not in (10, 20, null);
Returned nothing. Although I use NOT IN condition very sparingly because it does not use index and is very slow. I prefer to use OUTER JOIN instead.
I tried this query in Postgres and Oracle both and results are the same. So, must be a standards compliant result. NULL behaves this way only in NOT IN condition.