17.10 - Examples - 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)

Example: CHARACTER Data Type

In the following table definition, the column named Sex is assigned the CHARACTER data type with a length of one, and the column named Frgn_Lang is assigned the CHARACTER data type with a length of seven.

CREATE TABLE PersonalData
  (Id INTEGER
  ,Age INTEGER
  ,Sex CHARACTER NOT NULL UPPERCASE
  ,Frgn_Lang CHARACTER(7) NULL UPPERCASE );

Example: GRAPHIC Data and Client Character Sets

Consider the following table:

CREATE TABLE Product1Data
  (id1 INTEGER
  ,code1 CHARACTER(3) CHARACTER SET GRAPHIC);

Assume that column code1 contains the following data:

457F4577456D

Under a KanjiEBCDIC session in record or indicator mode, the contents of code1 are returned to the user as follows:

457F4577456D

Under a KanjiEBCDIC session in field mode, the contents of code1 are returned to the user in proper format, as follows:

0E457F4577456D0F