Equality Comparison - 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™

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.