15.10 - Setting Up the JSON Entity Reference Examples - Teradata Database

Teradata Database Teradata JSON

Product
Teradata Database
Release Number
15.10
Published
December 2015
Language
English (United States)
Last Update
2018-06-05
dita:mapPath
TeradataJSON_15_10.ditamap
dita:ditavalPath
ft:empty

Create and populate table(s) to use in subsequent example(s).

CREATE TABLE test.jsonTable(id INTEGER, jsonCol JSON(100));
CREATE TABLE test.jsonTable2(id INTEGER, jsonCol JSON(100));
CREATE TABLE test.jsonTable3(id INTEGER, jsonLatCol JSON(100) CHARACTER SET LATIN);

INSERT INTO test.jsonTable(1, new JSON('{"name" : "Cameron", "numbers" : [1,2,3,[1,2]]}'));
INSERT INTO test.jsonTable(2, new JSON('{"name" : "Cameron", "name" : "Lewis"}'));
INSERT INTO test.jsonTable(3,new JSON('{"name" : {"first" : "Cameron", "last" : "Lewis"}}'));

INSERT INTO test.jsonTable2(1, new JSON('{"name" : "Cameron", "numbers" : [1,2,3,[1,2]], "source" : "jsonTable2"}'));

INSERT INTO test.jsonTable3(1, new JSON('{"name" : "Cameron", "numbers" : [1,2,3,[1,2]], "source" : "jsonTable3"}'));