ISNULL vs COALESCE: Not as Interchangeable as They Look
ISNULL and COALESCE differ on result type, truncation, nullability, and how often they evaluate their input. When to use each.
One NULL Turns the Whole Concatenation Into NULL
With +, one NULL operand makes the whole concatenation NULL and a built-up label vanishes. Use CONCAT, COALESCE, or CONCAT_WS instead.
COUNT, AVG, and the NULLs Your Aggregates Ignore
COUNT(column), AVG, and COUNT(DISTINCT) ignore NULL but COUNT(*) does not, so totals stop matching. How to pick the right aggregate.
The CHECK Constraint That Lets NULL Through
A CHECK constraint accepts a row when its predicate is UNKNOWN, so CHECK (quantity >= 0) still allows NULL. How to close the gap.
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.