IN/ANY/SOME/ALL Syntax | SQL SELECT Statements | Teradata Vantage - IN, NOT IN, ANY, SOME, and ALL Logical Predicate Syntax - Analytics Database - Teradata Vantage

SQL Data Manipulation Language

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-04-05
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
Product Category
Teradata Vantage™
{ expression | ( expression [,...] ) }
  { comparison_operator | [NOT] IN ( in_list ) }
  [ ANY | SOME | ALL ] (subquery)

Syntax Elements

expression
SQL expression.
To specify multiple expressions, enclose the expressions in PARENTHESIS characters and separate each expression with a COMMA character.
comparison_operator
SQL comparison operator.
See Teradata Vantage™ - SQL Functions, Expressions, and Predicates, B035-1145 for information about the SQL comparison operators.
IN (in_list)
expression is either IN the parenthetically delimited list of values.
For information about the IN logical predicates and the valid expressions that you can specify in an in_list, see Teradata Vantage™ - SQL Functions, Expressions, and Predicates, B035-1145.
NOT IN (in_list)
expression is NOT IN the parenthetically delimited list of values.
For information about the NOT IN logical predicates and the valid expressions that you can specify in an in_list, see Teradata Vantage™ - SQL Functions, Expressions, and Predicates, B035-1145.
ANY
The ANY logical quantifier.
For more information about the ANY logical quantifier, see Teradata Vantage™ - SQL Functions, Expressions, and Predicates, B035-1145.
SOME
The SOME logical quantifier.
For more information about the SOME logical quantifier, see Teradata Vantage™ - SQL Functions, Expressions, and Predicates, B035-1145.
ALL
The ALL logical quantifier.
For more information about the ALL logical quantifier, see Teradata Vantage™ - SQL Functions, Expressions, and Predicates, B035-1145.
subquery
SQL subquery.