t-sql-correctness

Installation
SKILL.md

Write T-SQL that returns the right answer

Three failures. The silent one first, because nothing raises it: the statement succeeds, the row count looks plausible, the answer is wrong. Then PostgreSQL habit, which at least fails loudly. Then overcorrection, hand-rolling what the engine now does natively.

Scope

  • Upserts and MERGE are t-sql-upserts-merge.
  • JSON and OPENJSON are t-sql-json-and-openjson.
  • Table design is design-azure-sql-schema.

Wrong answers that raise no error

Nothing equals NULL, and nothing is unequal to it either. ANSI_NULLS is permanently ON and SET ANSI_NULLS OFF is deprecated, so every comparison against NULL is UNKNOWN, and WHERE keeps only the rows that are TRUE.

Installs
101
GitHub Stars
66
First Seen
Sep 28, 2026