Examples: Specifying the INLINE LENGTH for a JSON Type

Teradata Vantageā„¢ JSON Data Type

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1150-162K

The following examples show JSON type declarations with and without the INLINE LENGTH specification.

CREATE TABLE jsonTable1(id INTEGER,
   /* nonLOB */        jsn1 JSON(64000) CHARACTER SET LATIN);
CREATE TABLE jsonTable2(id INTEGER,
   /* nonLOB */         jsn1 JSON(1000) CHARACTER SET LATIN,
   /* LOB */            jsn2 JSON INLINE LENGTH 30000 CHARACTER SET LATIN);

The following is exactly the same as the example for jsonTable2, but with a different syntax.

CREATE TABLE jsonTable3(id INTEGER,
   /* nonLOB */         jsn1 JSON(1000) INLINE LENGTH 1000 CHARACTER SET LATIN,
   /* LOB */            jsn2 JSON INLINE LENGTH 30000 CHARACTER SET LATIN);
CREATE TABLE jsonTable4(id INTEGER,
   /* nonLOB */         jsn1 JSON(30000) INLINE LENGTH 30000,
   /* LOB */            jsn2 JSON INLINE LENGTH 100);
CREATE TABLE jsonTable5(id INTEGER,
   /* LOB */            jsn1 JSON(64000) INLINE LENGTH 100);
CREATE TABLE jsonTable6(id INTEGER,
   /* nonLOB */         jsn1 JSON(64000) INLINE LENGTH 64000 STORAGE FORMAT BSON);
CREATE TABLE jsonTable7(id INTEGER,
   /* nonLOB */         jsn1 JSON(64000) INLINE LENGTH 64000 STORAGE FORMAT UBJSON);