SQL Not In Nullable Trap

Why `x NOT IN (subquery)` matches zero rows and still reports success whenever a NULL is actually present in the subquery result — a standing risk for any nullable column — how to guard every such subquery, and how to make a silently-inert statement detectable instead of invisible. Reach for it when a DELETE or SELECT with a NOT IN filter returns nothing on data you can see with your own eyes, when a cleanup pass "succeeds" and frees nothing, or before writing any NOT IN over a nullable column.

maxrave-dev 2b80289 4.9 KB Updated

File contents

maxrave-dev/kotlin-footguns/tree/main/skills/sql-not-in-nullable-trap commit 2b80289c22

Frequently asked questions

npx skillmds@latest add maxrave-dev/sql-not-in-nullable-trap