Examples: Creating a Table with a JSON Auto Column - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

This example creates a table MyTable with the JSON auto column j.

CREATE TABLE MyTable (
a INTEGER, 
b INTEGER, 
j JSON AUTO COLUMN);

This table definition for MyTable includes the JSON auto column j defined with a length of 64K bytes and Latin character set.

CREATE TABLE MyTable (
a INTEGER, 
b INTEGER, 
j JSON(64000) CHARACTER SET LATIN AUTO COLUMN);

This table definition for MyTable includes the JSON column c, which is not an auto column, and the JSON auto column j defined with a length of 64K bytes and Latin character set.

CREATE TABLE MyTable (
a INTEGER, 
b INTEGER, 
c JSON, 
j JSON(64000) CHARACTER SET LATIN AUTO COLUMN);