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.
IS DISTINCT FROM: Comparing NULLs Without the Headache
It usually shows up in a code review. Someone writes a filter that is supposed to exclude voided rows, it looks completely reasonable, and yet a tester swears that records are going missing. The query…