JSON Dot Notation Examples | JSON Data Type | Teradata Vantage - Examples: Unambiguous JSON Dot Notation - 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ā„¢

The following shows unambiguous examples of JSON dot notation usage.

Example

SELECT jsonCol.name
FROM test.jsonTable
WHERE id=1;
Result:
jsonCol.name
------------
Cameron

Example

SELECT jsonCol.numbers[1]
FROM test.jsonTable
WHERE id=1;
Result:
jsonCol.numbers[1]
------------------
2

Example

SELECT new JSON('{"name" : "Cameron"}').name;
Result:
new JSON('{"name" : "Cameron"}').name
-------------------------------------
Cameron