Skip to content

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.

Where the book teaches it

Related terms

EXISTSNULLThree-valued logic