Usage Notes - 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™

External Representation

Whenever a client application talks to Vantage, it indicates its character set (form-of-use for character data). Vantage returns all character data to the application in that form.

Whenever multibyte characters are involved, their representation has the length (n-2)/2 multibyte characters exclusive of the preceding Shift-Out and following Shift-In characters.

The following table lists the client representations for the CLOB data type. Determining the application definitions and client data types is the responsibility of the application programmer.

Define the length of the CLOB string as k, where 0 ≤ k ≤ n.

Client CPU Architecture Client Internal Data Format
IBM mainframe Eight byte (most significant byte first) length count k followed by k bytes of EBCDIC character data for a total of k+8 bytes.
  • UTS
  • RISC
  • Motorola 68000
  • WE 32000
Eight byte (most significant byte first) length count k followed by k bytes of ASCII character data for a total of k+8 bytes.
Intel Eight byte (least significant byte first) length count k followed by k bytes of ASCII character data for a total of k+8 bytes.

Restrictions

A table can have a maximum of 32 LOB columns.

Queue tables cannot have CLOB columns.

A LOB column cannot be a component of an index. Because of this restriction, a table must define at least one non-LOB column.

The CHARACTER SET clause can specify the following server character sets for a CLOB column:
  • LATIN
  • UNICODE

Functions That Operate on CLOBs

The following are some functions and operators that support CLOB types:
  • CHARACTERS/CHARS/CHAR
  • MCHARACTERS
  • CHARACTER_LENGTH
  • TRANSLATE and TRANSLATE_CHK
  • SUBSTRING/SUBSTR
  • Concatenation operator (||)
  • TYPE
  • Explicit data type conversion (CAST and Teradata conversion syntax)
  • User-defined functions (UDFs)
  • Stored procedures
  • External stored procedures