Try OpenEdge Now
skip to main content
SQL Reference
SQL Reference : OpenEdge SQL Language Elements : Data types : Relational operators : Quantified Predicate
 
Quantified Predicate
The quantified predicate compares a value with a collection of values using a relational operator. A quantified predicate has the same form as a basic predicate with the query_expression being preceded by the ALL, ANY, or SOME keyword. The result table returned by query_expression can contain only a single column.
When you specify ALL, the predicate evaluates to true if the query_expression returns no values or the specified relationship is true for all the values returned.
When you specify SOME or ANY, the predicate evaluates to true if the specified relationship is true for at least one value returned by the query_expression. There is no difference between the SOME and ANY keywords. The predicate evaluates to false if the query_expression returns no values or if the specified relationship is false for all the values returned.

Syntax

This is the syntax for a quantified predicate:
expression relop { ALL | ANY | SOME } ( query_expression )

Example

10 < ANY
( SELECT COUNT(*)
FROM order_tbl
GROUP BY custid ;
)
* BETWEEN Predicate
* NULL Predicate
* LIKE Predicate
* EXISTS Predicate
* IN Predicate
* OUTER JOIN Predicate