In subquery expressions, quantified predicates make it possible to compare separate values with the results of subqueries; they have the following common form:
Available
DSQL, PSQL, ESQL
Syntax
Example
Show only those clients whose ratings are higher than the rating of every client in Paris.
ANY
and
DSQL, PSQL, ESQL
Syntax
The quantifiers ANY
and SOME
are identical in their behaviour. Apparently, both are present in the SQL standard so that they could be used interchangeably in order to improve the readability of operators. When the or the SOME
quantifier is used, the predicate is TRUE if any of the values returned by the subquery satisfies the condition in the predicate of the main query. If the subquery would return no rows at all, the predicate is automatically considered as FALSE.
Example