Mimer SQL Reference Manual TOC PREV NEXT INDEX

Mimer Developer Site

www.mimer.com/developer


The Quantified Predicate


A quantified predicate compares an expression with a set of values addressed by a subselect (as opposed to a basic predicate which compares two single-valued expressions).

The form of the quantified expression is:

The comparison operators, comp-operator, are described in Comparison and Relational Operators.

Within the context of a quantified predicate, a select-specification must result in either an empty set or a set of single values.

ALL Predicate

The result is true if the select-specification results in an empty set or if the comparison is true for every value returned by the select-specification.

The result is false if the comparison is false for at least one value returned by the select-specification.

The result is unknown if any of the values returned by the select-specification is NULL and no value is false.

ANY or SOME Predicates

The keywords ANY and SOME are equivalent.

The result is true if the comparison is true for at least one value returned by the select-specification.

The result is false if the select-specification results in an empty set or if the comparison is false for every value returned by the select-specification.

The result is unknown if any of the values returned by the select-specification is NULL and no value is true.

Quantified predicates may always be replaced by alternative formulations using EXISTS, which can often clarify the meaning of the predicates.



Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
dbtechnology@upright.se
Mimer SQL Reference Manual TOC PREV NEXT INDEX