Glossary: SQL Beyond the Basics
NOT IN trap
Also written: NOT IN
If the list in NOT IN (subquery) contains a NULL, the test is never true and the result is empty. Use NOT EXISTS, or filter NULLs out of the list.
Glossary: SQL Beyond the Basics
Also written: NOT IN
If the list in NOT IN (subquery) contains a NULL, the test is never true and the result is empty. Use NOT EXISTS, or filter NULLs out of the list.