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

SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual540440-003
6-102
Search Condition
Search Condition
A search condition is used to choose rows from tables or views, depending on the
result of applying the condition to rows. The condition is a Boolean expression
consisting of predicates combined together with OR, AND, and NOT operators.
You can use a search condition in the WHERE clause of a SELECT, DELETE, or
UPDATE statement, the HAVING clause of a SELECT statement, the searched form of
a CASE expression, the ON clause of a SELECT statement that involves a join, a
CHECK constraint, or a ROWS SINCE sequence function.
OR
specifies the resulting search condition is true if and only if either of the
surrounding predicates or search conditions is true.
AND
specifies the resulting search condition is true if and only if both the surrounding
predicates or search conditions are true.
NOT
reverses the truth value of its operand—the following predicate or search condition.
predicate
is a BETWEEN, comparison, EXISTS, IN, LIKE, NULL, or quantified comparison
predicate. A predicate specifies conditions that must be satisfied for a row to be
chosen. See Predicates on page 6-81 and individual entries.
search-condition is:
boolean-term | search-condition OR boolean-term
boolean-term is:
boolean-factor | boolean-term AND boolean-factor
boolean-factor is:
[NOT] boolean-primary
boolean-primary is:
predicate | (search-condition)