CLOB Data Type | Data Types and Literals | Teradata Vantage - CLOB Data Type - 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™

Represents a large character string. A character large object (CLOB) column can store character data, such as simple text or HTML.

A CLOB column can store XML or JSON documents; however, Teradata recommends that you use the Teradata XML and Teradata JSON data types for that purpose.

ANSI Compliance

CLOB is ANSI SQL:2011 compliant.

Syntax

{ CHARACTER LARGE OBJECT | CLOB }
   [ ( n [ K | M | G ] ) ]
   [ { CHARACTER | CHAR } SET { LATIN | UNICODE } ]
   [ attribute [...] ]

Syntax Elements

n
The number of characters to allocate for the CLOB column. The maximum value depends on the server character set:
  • For the LATIN server character set, n cannot exceed 2097088000.
  • For the UNICODE server character set, n cannot exceed 1048544000.
If a value for n is not specified, the default is the maximum value.
K
The number of characters to allocate for the CLOB column is nK, where K = 1024 and the maximum value for n is as follows:
  • For the LATIN server character set, n cannot exceed 2047937.
  • For the UNICODE server character set, n cannot exceed 1023968.
M
The number of characters to allocate for the CLOB column is nM, where M = 1024K and the maximum value for n is as follows:
  • For the LATIN server character set, n cannot exceed 1999.
  • For the UNICODE server character set, n cannot exceed 999.
G
The number of characters to allocate for the CLOB column is nG, where G = 1024M. When G is specified, n must be 1 and the server character set must be LATIN.
CHARACTER SET
The server character set for the CLOB column being defined:
  • The LATIN server character set represents fixed 8-bit characters from the ASCII ISO 8859 Latin1 or ISO 8859 Latin9 repertoires.
  • The UNICODE server character set represents fixed 16-bit or 32-bit characters from the Unicode® standard.
If the CHARACTER SET clause is omitted, the default server character set depends on how the user is defined in the DEFAULT CHARACTER SET clause of the CREATE USER statement. For details, see Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.
Also see CHARACTER SET Phrase.
attribute
Appropriate data type, column storage, or column constraint attributes.
A CLOB column supports the following attributes:
  • NOT NULL
  • FORMAT
  • TITLE
For more information about the NOT NULL attribute, see Default Value Control Phrases.
For more information about the FORMAT and TITLE attributes, see Data Type Formats and Format Phrases.