As a corollary to three-valued logic expressed in the previous blog, NOT IN comparisons are a regular source of surprise. Consider this comparison of one against various values:
SELECT 1 <> 2 AND 1 <> 3; ?column? ---------- t SELECT 1 <> 2 AND 1 <> 3 AND 1 <> NULL; ?column? ---------- (null)
If you're new here, you may want to subscribe to our RSS feed or follow us on Twitter for product announcements, event information, and industry news.
The NOT IN NULL Trap (Part 5/11)






