15.10 - Character Data - Teradata Database

Teradata Database SQL Data Types and Literals

Teradata Database
Programming Reference

In general, CHARACTER, VARCHAR, and CLOB data types represent character data.

Character data is automatically translated between the client and the database. Its form-of-use is determined by the client character set or session character set.

The form of character data internal to Teradata Database is determined by the server character set attribute of the column.

Note the definition of the following expressions used throughout this chapter.




Character data type

The definition for the type of data stored in a column.


  • “CHARACTER Data Type” on page 203
  • “VARCHAR Data Type” on page 208
  • “CLOB Data Type” on page 213
  • Client character set
  • Session character set
  • Session charset
  • Defines how Teradata Database translates character data from client form to server form and from server form to client form. Specifically, a client character set consists of a set of translation codes that map each character in the client character set to an equivalent character in a server character set.

    For details on client character sets, see International Character Set Support. For details on how to set the client character set for a session, refer to an appropriate tool or connectivity book such as Basic Teradata Query Reference or Teradata JDBC Driver User Guide.

    Server character set

    The internal character storage handling implied by the ANSI CHARACTER SET phrase.

    See “CHARACTER SET Phrase” on page 226.

    You can combine CHARACTER and VARCHAR types with the following options:

  • Server character set literal when the field data type is declared or modified.
  • Character literals can be prefixed with a server character set to ensure conformity to the given server character set.

    Teradata Database translates output characters (internal-to-external, or I2E) from server form to one of the following:

  • The normal character set of the logged-on client.
  • The character set defined in the system tables as the default for the logon client.
  • Query the DBC.HostsInfoV and DBC.CharSetsV views to see the contents of the system tables.

  • The character set specified for the current session, such as with the BTEQ .SET SESSION CHARSET command or the CLIv2 CHARSET call.