Neoview SQL Reference Manual (R2.2)

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”
A quantified comparison predicate compares the values of sequences of expressions to the values
in each row selected by a table subquery. The comparison operation is quantified by the logical
quantifiers ALL, ANY, or SOME.
row-value-constructor comparison-op quantifier table-subquery
row-value-constructor is:
(expression [,expression]...)
| row-subquery
comparison-op is:
= Equal
| <> Not equal
| != Not equal
| < Less than
| > Greater than
| <= Less than or equal to
| >= Greater than or equal to
quantifier is:
ALL | ANY | SOME
row-value-constructor
specifies the first operand of a quantified comparison predicate. The first operand can be
either of:
(expression [,expression ]...)
is a sequence of SQL value expressions, separated by commas and enclosed in parentheses.
expression cannot include an aggregate function unless expression is in a HAVING
clause. expression can be a scalar subquery (a subquery that returns a single row
consisting of a single column). See “Expressions” (page 208).
row-subquery
is a subquery that returns a single row (consisting of a sequence of values). See “Subquery”
(page 250).
ALL
specifies that the predicate is true if the comparison is true for every row selected by
table-subquery (or if table-subquery selects no rows), and specifies that the predicate
is false if the comparison is false for at least one row selected.
ANY | SOME
specifies that the predicate is true if the comparison is true for at least one row selected by
the table-subquery and specifies that the predicate is false if the comparison is false for
every row selected (or if table-subquery selects no rows).
242 SQL Language Elements