ANY/ALL/SOME Predicate Syntax - ANY/ALL/SOME Predicate Syntax - Advanced SQL Engine - Teradata Database

SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/djk1612415574830.ditamap
dita:ditavalPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/wrg1590696035526.ditaval
dita:id
B035-1145
lifecycle
previous
Product Category
Teradata Vantageā„¢
{ expression quantifier ( literal [ {, | OR} ... ] ) |
  { expression | ( expression [,...] ) } quantifier ( subquery )
}

Syntax Elements

expression
An expression that specifies a value.
quantifier
{ comparison_operator [ NOT ] IN } { ALL |ANY | SOME }
literal
A literal value.
subquery
A subquery that selects the same number of expressions as are specified in the expression or list of expressions.
The subquery cannot specify a SELECT AND CONSUME statement.
comparison_operator
A comparison operator that compares the expression or list of expressions and the literals in the list (Literals syntax) or the subquery (Subquery syntax) to produce a TRUE, FALSE or UNKNOWN result.
[ NOT] IN
A predicate that tests the existence of the expression or list of expressions in the list of literals (Literals syntax) or the subquery (Subquery syntax) to produce a TRUE, FALSE, or UNKNOWN result.