ALLBASE/SQL Reference Manual (36216-90216)

278 Chapter9
Search Conditions
Quantified Predicate
Quantified Predicate
A quantified predicate compares an expression with a list of specified values or a list of
values derived from a subquery. The predicate evaluates to true if the expression is related
to the value list as specified by the comparison operator and the quantifier.
Scope
SQL Data Manipulation Statements
SQL Syntax
Expression
{=
<>
>
>=
<
<=} {ALL
ANY
SOME} {
SubQuery
(
ValueList
)}
Parameters
Expression
An expression specifies a value to be obtained. The syntax of expressions is
presented in Chapter 8 , “Expressions.
= is equal to.
<> is not equal to.
> is greater than.
>= is greater than or equal to.
< is less than.
<= is less than or equal to.
ALL, ANY, SOME are quantifiers which indicate how many of the values from the
ValueList
or
SubQuery
must relate to the expression as indicated by the
comparison operator in order for the predicate to be true. Each quantifier
is explained below:
ALL the predicate is true if
all
the values in the
ValueList
or
returned by the
SubQuery
relate to the expression as
indicated by the comparison operator.
ANY the predicate is true if
any
of the values in the
ValueList
or returned by the
SubQuery
relate to the expression as
indicated by the comparison operator.
SOME a synonym for ANY.