ALLBASE/SQL Reference Manual (36216-90216)

262 Chapter9
Search Conditions
Search Condition
Search Condition
A search condition is a single predicate or several predicates connected by the logical
operators AND or OR. A predicate is a comparison of expressions that evaluates to a value
of TRUE, FALSE, or unknown. If a predicate evaluates to TRUE for a row, the row
qualifies for the select, update, or delete operation. If the predicate evaluates to FALSE or
unknown for a row, the row is not operated on.
Scope
SQL Data Manipulation Statements
SQL Syntax
[NOT] {
BetweenPredicate
ComparisonPredicat
e
ExistsPredicate
InPredicate
LikePredicate
NullPredicate
QuantifiedPredicate
(SearchCondition)
} [ {AND
OR} [NOT] {
BetweenPredicate
ComparisonPredicate
ExistsPredicate
InPredicate
LikePredicate
NullPredicate
QuantifiedPredicate
(SearchCondition)
} ] [...]
Parameters
NOT, AND, OR are logical operators with the following functions:
NOT reverses the value of the predicate that follows it.
AND evaluates predicates it joins to TRUE if they are both
TRUE.
OR evaluates predicates it joins to TRUE if either or both are
TRUE.
BetweenPredicate
determines whether an expression is within a certain
range of values.
ComparisonPredicate
compares two expressions.
ExistsPredicate
determines whether a subquery returns any non-null
values.
InPredicate
determines whether an expression matches an element
within a specified set.