Skip to content
Bugwise
Menu

NULL

Also called: NULL value

A database marker for "no value" or "unknown". It's not zero and not an empty string.

Definition

NULL behaves differently from normal values: nothing is equal to NULL (not even NULL), so you must write IS NULL or IS NOT NULL. Conditions like city <> 'Berlin' also skip rows where city is NULL, a common source of wrong counts.

In practice

WHERE coupon_id = NULL returns zero rows without any error. WHERE coupon_id IS NULL returns the orders placed without a coupon.

Learn it in context

Lessons that use this term.

Related terms

Esc

Type to search the whole site.