Understand three-valued logic in WHERE and CHECK, avoid NULL-poisoned NOT IN, and use SQL Server 2022 null-safe comparisons.
SQL SERVER – Puzzle Involving NULL – Resolve – Error – Operand data type void type is invalid for sum operator
SELECT SUM over a lone NULL throws Msg 8117: Operand data type void type is invalid for sum operator. Here is why it happens and how ISNULL fixes it.
SQL SERVER – Compound Assignment Operators – A Simple Example
SQL Server 2008 added Compound Assignment Operators like += and *=, which change a variable and assign it on one line. A simple example and the full list.
SQL SERVER – 2005 Comparison EXCEPT operator vs. NOT IN
The EXCEPT operator returns distinct rows from the left query with no match on the right, just like NOT IN. Both give the same plan, but EXCEPT reads simpler.



