Comparison Operator Syntax | VantageCloud Lake - Comparison Operator Syntax - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
{ expression_1 operator expression_2 |
  expression_1 operator quantifier ( literal [,...] ) |
  expression_1 operator [ quantifier ] ( subquery ) |
  ( expression_1 [,...] ) operator [ quantifier ] ( subquery )
}

Syntax Elements

expression_1
An SQL scalar expression, including derived period expressions.
Comparison operators do not support BLOB or CLOB type expressions. You can explicitly cast BLOBs to BYTE or VARBYTE and cast CLOBs to CHARACTER or VARCHAR, and use the result with comparison operators.
operator
A comparison operator—see Supported Comparison Operators.
expression_2
An SQL scalar expression, including derived period expressions.
quantifier
One of the following quantifier keywords:
  • ANY
  • SOME
  • ALL
literal
Any of the following:
  • Defined value
  • Macro parameter
  • Built-in value such as TIME, DATE, or USER
The comparison operation may compare an expression against a list of explicit literals.
The data types of expression and literal must be compatible. If the data types of the operands differ, Vantage may perform an implicit conversion from one type to another.
subquery
An SQL SELECT statement.
Using a subquery in a condition is restricted in certain cases.