JSON_KEYS JSON Table Operator Syntax | Teradata Vantage - JSON_KEYS Syntax - 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ā„¢
[TD_SYSFNLIB.] JSON_KEYS (
  ON (json_expr)
  [ USING name_value_pair [...] ]
) [AS] correlation_name

Syntax Elements

name_value_pair
{ DEPTH | QUOTES } (value)
TD_SYSFNLIB
The name of the database where the function is located.
json_expr
An expression that evaluates to correct JSON syntax. The expression can be a CHAR, VARCHAR, CLOB, or JSON representation of a JSON data type in LATIN or UNICODE.
AS
An optional keyword introducing correlation_name.
correlation_name
An alias for the input column specified by the ON clause.
ANSI SQL refers to aliases as correlation names. They are also referred to as range variables.
DEPTH
An optional clause that restricts the depth of the search. value is a positive integer that specifies the maximum depth for the search.
The default value is the maximum depth of the JSON instance.
For example, setting the depth to 1 gets the top level keys in the JSON instance.
QUOTES
An optional clause that specifies whether or not the key names in the result are enclosed in double quotation marks as follows:
  • If value is 'Y' or 'y', the key names in the result are enclosed in double quotation marks. This is the default if the USING QUOTES clause is not specified.
  • If value is 'N' or 'n', the key names in the result are not enclosed in double quotation marks.