16.20 - Conditions - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2020-03-25
dita:mapPath
xzf1512079057909.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
kby1472250656485

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

For simplicity, assume the syntax:

expression_1operatorexpression_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, Teradata Database 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.