Combine JSON Method Examples | Teradata Vantage - Setting Up the Combine Examples - Advanced SQL Engine - Teradata Database

JSON Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
gzn1554761068186.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1150
lifecycle
previous
Product Category
Teradata Vantageā„¢
Create and populate two tables containing JSON objects and INTEGER data. The examples in the following sections refer to this table and data.
CREATE TABLE my_table (eno INTEGER, 
				 edata JSON(100) CHARACTER SET UNICODE, 
				 edata2 JSON(100) CHARACTER SET LATIN);

CREATE TABLE my_table2 (eno INTEGER, 
				  edata JSON(100) CHARACTER SET UNICODE, 
				  edata2 JSON(100) CHARACTER SET LATIN);

INSERT INTO my_table (1, NEW JSON('{"name" : "Cameron"}'), NEW JSON('{"name" : "Lewis"}')); 
INSERT INTO my_table (2, NEW JSON('{"name" : "Melissa"}'), NEW JSON('{"name" : "Lewis"}')); 
INSERT INTO my_table (3, NEW JSON('[1,2,3]'), NEW JSON('{"name" : "Lewis"}'));

INSERT INTO my_table2 (1, NEW JSON('{"name" : "Cameron"}'), NEW JSON('{"name" : "Lewis"}')); 
INSERT INTO my_table2 (2, NEW JSON('{"name" : "Melissa"}'), NEW JSON('{"name" : "Lewis"}'));