SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
S-5
Search Conditions
Search Conditions
A search condition is a set of predicates (or other search conditions) combined with
logical operators (AND, OR, or NOT) that specifies criteria for choosing rows from
tables or views.
You can use a search condition in the WHERE clause in a SELECT, DELETE, or
UPDATE statement; in the HAVING clause in a SELECT statement; in the ON clause
in a SELECT statement that involves a join; in the CHECK clause in the CREATE
CONSTRAINT statement; and in the select-statement portion of a subquery or of
the INSERT or CREATE VIEW statement.
NOT
reverses the truth value of the subsequent predicate or search condition.
BETWEEN Comparison predicate, EXISTS, IN, LIKE, NULL, and
Quantified predicate
are predicates that specify conditions that must be satisfied for a row to be
operated on. For more information, see the entries for specific predicate types.
search-condition
is another search condition.
OR
specifies that the search condition is true if either of the surrounding predicates or
search conditions are true.
AND
specifies that the search condition is true only if both the surrounding predicates or
search conditions are true.
[ NOT ] { p } [ { AND } [ NOT ] { p } ] ...
{ (p) } [ { OR } { (p) } ]
p is:
BETWEEN
Comparison predicate (=, <>, <, >, <=, or >=)
EXISTS
IN
LIKE
NULL
Quantified predicate (ANY, ALL, or SOME)
search-condition