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

Teradata Vantage™ - SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1146-175K
Language
English (United States)
{ 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.