Database: Fields: NULLs

NULLs in arithmetic

If one or both of the operands of the arithmetic operators (+, -, *, /) is NULL, the result is NULL.

NULLs and three-valued logic

NULL as either operand of a comparison (< <= = <> >= >) will result in a unknown value as the result - not true, not false.

Inefficiency of NULLs

If a field can be NULL, it's necessary for the database to keep extra information about each row for that column. Usually it is just one extra bit, but it has to be tested each time.

General Advice: Avoid using NULLs

Clarifying NULL with an Extra Column

One solution to the multiple possible meanings of NULL is to use an extra column which tells what that NULL means - missing data, not applicable, ....