16.20 - Equality Comparison - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Functions, Expressions, and Predicates

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

Comparison of character strings, which can contain mixed single byte and multibyte character data, is handled as follows:

  • If expression_1 and expression_2 have different server character sets, then they are converted to the same type. For details, see "Implicit Character-to-Character Translation" in Teradata Vantage™ Data Types and Literals, B035-1143.
  • If expression_1 and expression_2 are of different lengths, the shorter string is padded with enough pad characters to make both the same length.
  • Session mode is identified:
    In this mode … The default case specification for a character string is …
    ANSI CASESPECIFIC.
    Teradata NOT CASESPECIFIC.

    Unless the CASESPECIFIC phrase is applied to one or both of the expressions, any simple Latin letters in both expression_1 and expression_2 are converted to uppercase before comparison begins.

    To override the default case specification of a character expression, apply the CASESPECIFIC or NOT CASESPECIFIC phrase.

  • Case specification is determined:
    IF … THEN the comparison is …
    either argument is CASESPECIFIC case specific.
    both arguments are NOT CASESPECIFIC case blind.
  • Trailing pad characters are ignored.