15.10 - CHARACTER SET Phrase - Teradata Database

Teradata Database SQL Data Types and Literals

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
featnum
B035-1143-151K

Specifies the server character set for a character column.

The CHARACTER SET phrase is entry-level ANSI-compliant.

Implementation-defined character sets are intermediate-level ANSI‑compliant.

To define the server character set for a character column, use the CHARACTER SET phrase of a character column definition in the CREATE TABLE statement.

This optional phrase defines the internal handling of character data stored on the server and has nothing to do with the client, or session, character set.

If you omit the CHARACTER SET clause, then the default server character set for the column depends on how the user accessing the data in the table is defined in the DEFAULT CHARACTER SET clause of the CREATE USER statement. For details, see SQL Data Definition Language. If there is no default character set specified for the user, the system defaults to the character set associated with the language mode, that is, LATIN for standard language mode and UNICODE for Japanese language mode.

Teradata SQL supports five server character sets for use with CHARACTER SET. The following topics discuss each server character set in detail:

  • “LATIN Server Character Set” on page 228
  • “UNICODE Server Character Set” on page 229
  • “GRAPHIC Server Character Set” on page 230
  • “KANJISJIS Server Character Set” on page 231
  • “KANJI1 Server Character Set” on page 232
  • Notice:

    KANJI1 support is deprecated. KANJI1 is not allowed as a default character set. The system changes the KANJI1 default character set to the UNICODE character set. Creation of new KANJI1 objects is highly restricted. Although many KANJI1 queries and applications may continue to operate, sites using KANJI1 should convert to another character set as soon as possible.

    You cannot use the CHARACTER SET phrase for a UDT column.

    The CHARACTER SET phrase is a form of explicit translation.

    For information on explicit translation of CHARACTER data, see “TRANSLATE Function” in SQL Functions, Operators, Expressions, and Predicates.

    If the CHARACTER SET phrase is applied to a character expression, the expression is first translated using the implicit translation rules (see “Implicit Character-to-Character Translation” in SQL Functions, Operators, Expressions, and Predicates), and then truncated or extended as appropriate.

     

    FOR this server_character_set

    THE n in CHAR(n) or VARCHAR(n) indicates the number of these in the translation result …

  • UNICODE
  • LATIN
  • GRAPHIC
  • characters

  • KANJISJIS
  • KANJI1
  • bytes