15.10 - Setting Up the Combine Examples - Teradata Database

Teradata Database Teradata JSON

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1150-151K
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"}'));