SQL Server Science
Technical Articles for the DBA / Developer
Home » NULL » Page 2

The Inequality Filter That Drops Your NULL Rows

2026-09-20 · by Hannah Vernon · in t-sql

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

2026-09-19 · by Hannah Vernon · in t-sql

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.

The MERGE That Would Not Update: A NULL in Your Change Detection

2026-09-18 · by Hannah Vernon · in t-sql

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.

One NULL in the List and NOT IN Returns Nothing

2026-09-07 · by Hannah Vernon · in t-sql

NOT IN and NOT EXISTS read like the same thing. Find the rows that are not in that other set. They agree until the other set contains a NULL, at which point NOT IN returns…

ISNULL Truncates Your Replacement Value; COALESCE Doesn’t

2026-09-06 · by Hannah Vernon · in t-sql

ISNULL and COALESCE look like the same function wearing different names. Both take a value, both give you something else when that value is NULL. They differ in how they decide the type of what…

The NULL Bitmap: How SQL Server Records Nullability

2026-07-17 · by Hannah Vernon · in Internals

Every SQL Server data row carries a NULL bitmap, even a table with no nullable columns. Find it on the page, watch the bits flip as columns go NULL, and see what it actually costs.

« Previous 1 2

Search

Categories

  • AI for DBAs
  • announcements
    • events
  • basics
    • localization
  • configuration
  • Data Architecture
  • DMVs
  • documentation
  • extended-events
  • Git for DBAs
  • High Availability
  • Hot Takes
  • Internals
  • maintenance
    • patching
  • Opinion
  • performance
  • PostgreSQL
  • Professional Development
  • recovery
  • reporting
  • ROLLBACK;
  • security
    • data security
  • service broker
  • SQL Server Agent
  • statistics
  • sys
  • t-sql
    • xml
  • tools
    • data masking
    • wsus
  • troubleshooting
  • Uncategorized

Pages

  • About SQL Server Science
  • Blog Series
    • Backup & Recovery from First Principles: Series Contents
    • Database as a Versioned Contract: Series Contents
    • Extended Events in Production: Series Contents
    • Git for DBAs: Series Contents
    • How SQL Server Stores Data: Series Contents
    • Logins, SIDs, and Kerberos from First Principles: Series Contents
    • Proving the Restore: Series Contents
    • T-SQL Style Guide, Tested: Series Contents
    • The UNKNOWN Problem: NULL Traps in T-SQL, Series Contents
    • Undocumented Changes in SQL Server 2022 and 2025: Series Contents
  • Get Better Help with a Minimal, Complete, and Verifiable Example, or MCVE
  • Privacy Policy

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.

To find out more, including how to control cookies, see here: Cookie Policy

Copyright © 2026 SQL Server Science