{
  "id": 2446829,
  "title": "NULL in SQL: Why = NULL Finds Nothing and What to Write Instead",
  "url": "https://urgent.news/2026/08/21/null-in-sql-why-null-finds-nothing-and-what-to-write-instead",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-21T22:56:06.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/michaelnocito/null-in-sql-why-null-finds-nothing-and-what-to-write-instead-4b64"
  },
  "original_language": "en",
  "account": "NULL is a special value in SQL that represents an unknown or missing value. When used in a comparison, such as = NULL, it always returns unknown, which means the row is excluded from the result set. This is why a query like SELECT * FROM tickets WHERE assignee = NULL; returns zero rows, even for tickets with no assignee. To check for NULL values specifically, use the IS NULL operator, like WHERE assignee IS NULL. This distinction is crucial because NULL does not equal any value, including itself. Understanding this concept helps in predicting query behavior and avoiding unexpected results. For example, the query SELECT COUNT(*) AS n FROM tickets WHERE assignee IS NULL; returns the number of rows with missing assignees, which is the intended result.",
  "summary": "By Michael Nocito , data analyst · Published August 7, 2026 By the end of this page you can predict what any query does when it meets a missing value, which is the skill that separates \"my query returned nothing and I don't know why\" from a two-second fix. You will know why = NULL matches zero rows, why one NULL can empty an entire NOT IN , and how NULLs quietly move averages, counts, groups, and…",
  "key_points": [
    "NULL represents unknown or missing values in SQL",
    "Comparing with = NULL always returns unknown and excludes rows",
    "IS NULL operator checks specifically for NULL values"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}