JSON Data Type | Creating & Altering Tables for JSON Data | VantageCloud Lake - Creating and Altering Tables to Store JSON Data - 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
You can create tables containing JSON type columns or alter a table to add, drop, or rename JSON type columns:
  • You can use the CREATE TABLE statement to create a table that contains one or more JSON type columns.
    You cannot use a JSON type column in an index definition.
  • You can use the ALTER TABLE statement to add, drop, or rename a JSON type column.
  • You can use ALTER TABLE to change the maximum length and inline storage length of a JSON column subject to the following restrictions:
    • If the existing JSON column type is a LOB type, you can only change the maximum length to a larger value.
    • If the existing JSON column type is a non-LOB type, the newly changed data type must remain a non-LOB type, and the new maximum length and inline length values must be greater than the old values.
  • You cannot use ALTER TABLE to change the storage format of an existing column.

If you want to change the storage format of a JSON column, you must drop the column and add the column back specifying the new storage format.