skip to main content
Basic elements of SQL : Nulls
 

Nulls

If a column in a row has no value, then the column is said to be null or to contain a null. Nulls can appear in columns of any data type that are not restricted by NOT NULL or PRIMARY KEY integrity constraints. Use a null when the actual value is not known or when a value would not be meaningful.
Null and a value of 0 are not equivalent. Any arithmetic expression containing a null always evaluates to null. For example, null added to 10 is null. In fact, all operators (except concatenation) return null when given a null operand.
Most aggregate functions ignore nulls. To test for nulls, use only the comparison operators IS NULL and IS NOT NULL. If you use any other operator with nulls and the result depends on the value of the null, the result is UNKNOWN. Because null represents a lack of data, a null cannot be equal or unequal to any value or to another null. OpenAccess SDK considers two nulls to be equal when evaluating a DECODE expression.