Examples - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
Product Category
Teradata Vantage™

Example: CHARACTER Data Type

In the following table definition, the column named Gender 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
  ,Gender 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