Conditions

Teradata Vantage™ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

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.