Examples: Creating a Table with a JSON Auto Column - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

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);