JSON Data Type (Text-Based Format) - Advanced SQL Engine - Teradata Database

Database Design

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
kko1591750222108.ditamap
dita:ditavalPath
kko1591750222108.ditaval
dita:id
B035-1094
lifecycle
previous
Product Category
Teradata Vantageā„¢
The text-based format is the default storage format for JSON data. Other storage formats for JSON data include binary and universal binary formats, as described in the following pages.

JSON data can be stored inline (inside a row) or outside the row in a LOB subtable or both, depending on the syntax used to specify it:

Syntax Default Inline Storage Maximum Length LOB/Non-LOB
JSON 4,046 bytes 16,776,192 bytes LOB
JSON(n) CHARACTER SET LATIN, where n <= 64,000 n characters ncharacters Non-LOB
JSON(n) CHARACTER SET LATIN, where n > 64,000 4,096 bytes ncharacters LOB
JSON(n) CHARACTER SET LATIN INLINE LENGTH m m characters ncharacters

If n <= m, Non-LOB

Otherwise, LOB

JSON(n) CHARACTER SET UNICODE, where n <= 32,000 n characters n characters Non-LOB
JSON(n) CHARACTER SET UNICODE, where n > 32,000 4,096 bytes n characters LOB
JSON(n) CHARACTER SET UNICODE INLINE LENGTH m m characters ncharacters

If n <= m, Non-LOB

Otherwise, LOB

If there is no column length specified, the default length is the maximum.

For more information on the JSON data type, see Teradata Vantageā„¢ - JSON Data Type, B035-1150.