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

SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
qtb1554762060450.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1146
lifecycle
previous
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.