Conditions - Advanced SQL Engine - Teradata Database

SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-30
dita:mapPath
tpt1555966086716.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1145
lifecycle
previous
Product Category
Teradata Vantage™

The following table provides the conditions when comparisons produce TRUE results.

For simplicity, assume the syntax:

expression_1 operator expression_2

expression_1 and expression_2 must contain the same number of scalar values and range from 1 through n rows, represented by r, so that the rth components of expression_1 and 
expression_2 are expression_1r and expression_2r.

The δth item in the range is notated as row δ such that the δth component of expression_1 is notated as expression_1δ and the δth component of expression_2 is notated as expression_2δ.

The data types of expression_1 and expression_2 must be compatible. If the data types of the expressions differ, Vantage performs an implicit conversion from one type to another in some cases.

This comparison … Is TRUE if …
expression_1 = expression_2 r, expression_1r = expression_2r is TRUE.
expression_1 <> expression_2 ∃ δ such that expression_1δ <> expression_2δ is TRUE.
expression_1 < expression_2 ∃ δ such that expression_1δ < expression_2δ is TRUE and for all r < δ, expression_1r = expression_2r is TRUE.
expression_1 > expression_2 ∃ δ such that expression_1δ >expression_2δ is TRUE and for all r > δ, expression_1r = expression_2r is TRUE.
expression_1 <= expression_2 expression_1 < expression_2 is TRUE or 
expression_1 = expression_2 is TRUE.
expression_1 => expression_2 expression_1 > expression_2 is TRUE or 
expression_1 = expression_2 is TRUE.