Equivalences Using ANY/ALL/SOME and Comparison Operators - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The following table provides equivalences for the ANY/ALL/SOME quantifiers, where op is a comparison operator.

Expression Equivalent Expression
x op ALL (:a, :b, :c) (x op :a) AND (x op :b) AND (x op :c)
x op ANY (:a, :b, :c) (x op :a) OR (x op :b) OR (x op :c)
x op SOME (:a, :b, :c)

Examples:

Expression Equivalent Expression
x < ALL (:a, :b, :c) (x < :a) AND (x < :b) AND (x < :c)
x > ANY (:a, :b, :c) (x > :a) OR (x > :b) OR (x > :c)
x > SOME (:a, :b, :c)