The Inequality Filter That Drops Your NULL Rows
A WHERE inequality drops rows where the column is NULL, because the comparison is UNKNOWN. When to add OR col IS NULL, and when not to.
NOT IN With a NULL Returns Nothing
One NULL in a NOT IN subquery makes the whole predicate UNKNOWN and returns zero rows. Why it happens and how NOT EXISTS fixes it.
The MERGE That Would Not Update: A NULL in Your Change Detection
A MERGE upsert skips a NULL-to-value change and updates nothing, with no error. The three-valued-logic cause and two NULL-safe fixes.
One NULL in the List and NOT IN Returns Nothing
NOT IN and NOT EXISTS read like the same thing. Find the rows that are not in that other set. They agree until the other set contains a NULL, at which point NOT IN returns…
ISNULL Truncates Your Replacement Value; COALESCE Doesn’t
ISNULL and COALESCE look like the same function wearing different names. Both take a value, both give you something else when that value is NULL. They differ in how they decide the type of what…
The NULL Bitmap: How SQL Server Records Nullability
Every SQL Server data row carries a NULL bitmap, even a table with no nullable columns. Find it on the page, watch the bits flip as columns go NULL, and see what it actually costs.