Character Data | Data Types and Literals | Teradata Vantage - 17.10 - Character Data - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1143-171K
Language
English (United States)

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 Vantage is determined by the server character set attribute of the column.

Terminology

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

Expression Definition
Character data type The definition for the type of data stored in a column.
  • Client character set
  • Session character set
  • Session charset
Defines how Vantage 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 Teradata Vantage™ - Advanced SQL Engine International Character Set Support, B035-1125. For more information on how to set the client character set for a session, refer to an appropriate tool or connectivity document such as Basic Teradata® Query Reference, B035-2414 or Teradata JDBC Driver Reference, available at https://teradata-docs.s3.amazonaws.com/doc/connectivity/jdbc/reference/current/frameset.html.

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

See CHARACTER SET Phrase.

Options

You can combine CHARACTER and VARCHAR types with the following options:
  • Case option ([NOT]CASESPECIFIC or UPPERCASE).
  • 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.

Vantage Output Conversion

Vantage 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.