ANY/ALL/SOME Quantifiers and Literal Syntax - Analytics Database - Teradata Vantage

SQL Functions, Expressions, and Predicates

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-01-12
dita:mapPath
obm1628111499646.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
kby1472250656485
lifecycle
latest
Product Category
Teradata Vantage™

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

IF the predicate is … AND specifies … THEN the result is true when …
a comparison 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.