NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
S-5
Search Conditions
You want to set up this session environment and add these DEFINEs each time you
execute a particular query.To save the commands, enter the following commands:
>> SAVE ENV TO SETUP1 CLEAR;
>> SAVE DEFINES TO SETUP1;
The first command saves the VOLUME, LOG, and SYSTEM commands in the file
SETUP1.The next command appends all of the ADD DEFINE commands to
SETUP1.To set up the environment and DEFINEs, enter:
>> OBEY SETUP1;
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
UDPATE 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.
[ 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