17.10 - Conditions - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/djk1612415574830.ditamap
dita:ditavalPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/wrg1590696035526.ditaval
dita:id
kby1472250656485

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.