The null value is a special value that indicates either that no value exists or the value has not been set. The null value is set in an area that does not contain values or in which values have not been set. The null value in an abstract data type indicates whether or not a value has been generated by the constructor function.
The following explains how the null value is handled.
The value of an indicator variable indicates whether or not the null value was received. The null value cannot be received by an embedded variable. For details, see 1.5.5 Setting a value for an indicator variable.
The value of an indicator variable indicates whether or not the null value was stored. The null value cannot be stored in a table by an embedded variable. For details, see 1.5.5 Setting a value for an indicator variable.
If the value of a specified value expression, column, or embedded variable for a row in a predicate other than the NULL predicate is the null value, the predicate is undefined. An indicator variable is required to specify the null value using an embedded variable.
A row containing the null value in the joined column does not satisfy the join conditions.
In the case of an ascending-order sort, the null value is output at the end; in the case of a descending-order sort, the null value is output at the beginning.
If a row contains null values in grouping condition columns, SQL performs grouping by treating the null values as being the same value.
Multiple null values are treated as duplicates.
In general, set functions ignore the null value. The COUNT(*) function, however, calculates all eligible rows, regardless of null values that may be present in the rows.
The COUNT(*) and OVER() functions calculate all eligible rows, regardless of null values that may be present in the rows.
An index can be defined for a column that contains null values.
An arithmetic, date, time, or concatenation operation performed on the null value as a data value produces the null value.
Scalar functions other than VALUE and STRTONUM produce the null value as the result when any of the value expressions in an argument is the null value. The VALUE scalar function produces the null value as the result when all value expressions in an argument are the null value. The STRTONUM scalar function produces the null value as the result when the value expression for argument 1 is the null value.
In COALESCE of CASE abbreviation, if the value expressions of arguments are all null values, the results will also be null values.
How the null value in an abstract data type is handled is explained in terms of two cases: a value is generated by specifying a constructor function for the abstract data type, and a value is not generated by specifying a constructor function.
A Boolean predicate being undefined is equivalent to a Boolean value being the null value.
Some elements may have a null value. If all column elements are 0, the entire column is treated as null.
In the case of a WRITE specification, the result will be the null value if any of the arguments is the null value.
The result of a GET_JAVA_STORED_ROUTINE_SOURCE specification will be the null value if any of the following conditions is satisfied:
If NULL is specified in the value expression or the result of the value expression is the null value, the value of the result is the null value.
If the null value is contained in a foreign key component column, that column is not subject to referential constraint operation.