SQL/MX 2.x Reference Manual (G06.24+, H06.03+)

SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual523725-004
6-99
Quantified Comparison Predicates
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
Quantified Comparison Predicates
Considerations for ALL, ANY, SOME
Examples of ALL, ANY, SOME
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