Using SOME(ANY) and ALL keywords with comparison predicates
SOME and ANY are synonyms, i.e. any of them may be used. The subquery results is a single value column. If any value V returned by the subquery evaluates the operation "<expression value> <comparison operator> V" to TRUE, the ANY predicate is also equal to TRUE.
is similar to that with ANY, except that all values returned by the subquery must meet the predicate "<expression> <comparison operator> V ".
Find the PC makers whose models are not presently sold (i.e. they are not available in the PC table):
It turns out that maker E has not supplied their models from sale:
Let us consider that example in details. The predicate
Find the models and prices for laptops with priced above any PC:
Here are the formal rules for evaluating the predicate with ANY|SOME and ALL parameters: