SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual540440-003
6-96
NULL Predicate
Considerations for NULL
Summary of NULL Results
Let rvc be the value of the row-value-constructor. This table summarizes the
results of NULL predicates. The degree of a rvc is the number of values in the rvc.
Note that the rvc IS NOT NULL predicate is not equivalent to NOT rvc IS NULL.
Examples of NULL
Find all rows with null in the SALARY column:
salary IS NULL
This predicate evaluates to true if the expression (PRICE + TAX) evaluates to null:
(price + tax) IS NULL
Find all rows where both FIRST_NAME and SALARY are null:
(first_name, salary) IS NULL
Expressions
rvc IS
NULL
rvc IS
NOT NULL
NOT rvc IS
NULL
NOT rvc IS
NOT NULL
degree 1: null TRUE FALSE FALSE TRUE
degree 1: not null FALSE TRUE TRUE FALSE
degree>1: all null TRUE FALSE FALSE TRUE
degree>1: some null FALSE FALSE TRUE TRUE
degree>1: none null FALSE TRUE TRUE FALSE