databasessql
Watch for null values with NOT IN
Anonymous
In SQL, a null in the subquery can make NOT IN evaluate to unknown for rows that otherwise look unmatched. When nulls are possible, NOT EXISTS is often easier to reason about, with the join condition spelled out.
0