Thursday, January 17, 2008

Everything is NOT IN nothing

Everything is NOT IN nothing (a.k.a. NULL). See the Oracle Documentation on the IN Condition - it says NOT IN [is] Equivalent to !=ALL. Evaluates to FALSE if any member of the set is NULL.

SQL> SELECT 'x' FROM DUAL
2 WHERE 3 NOT IN (1,2,NULL);

no rows selected

Counter-intuitive or what?

0 Comments:

Post a Comment

<< Home