IT lexicon › Database › NULL value

NULL value

Database På svenska → Updated: 2026-11-11

A special marker in relational databases representing missing, unknown, or inapplicable data — distinct from zero or empty string.

NULL is one of relational databases' most controversial design choices. It represents the absence of a value — not zero, not empty string, but something specifically "unknown" or "not applicable." This solved a real problem: how do you represent that we don't know someone's phone number, or that a field simply doesn't apply to this row?

The problem is that NULL breaks ordinary logic. The comparison `NULL = NULL` is never true — it's unknown whether two unknown values are equal. This required SQL to introduce a special `IS NULL` syntax instead of `= NULL`. Many database designers avoid NULL when possible by using defaults or restructuring data. Yet NULL has been a permanent part of SQL and relational databases since the beginning. It's also spawned an entire branch of logic (three-valued logic) to handle truth values of unknown.

← Back to the lexicon