ANY/ALL/SOME Quantifiers and Literal Syntax - 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

When a list of literals is used with quantifiers and comparison operations or IN/NOT IN predicates, the results are determined as follows.

Predicate Quantifier When Result is TRUE
aComparison operation ALL the comparison of expression and every literal in the list produces true results.
ANY the comparison of expression and any literal in the list is true.
SOME
IN ALL expression is equal to every literal in the list.
ANY expression is equal to any literal in the list.
SOME
NOT IN ALL expression is not equal to any literal in the list.
ANY expression is not equal to every literal in the list.
SOME

For comparison operations, implicit conversion rules are the same as for the comparison operators.

If expression evaluates to NULL, the result is considered to be unknown.