15.10 - Example: SQL UDF with RETURN clause - 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
This example shows an SQL UDF with a RETURN expression that evaluates to JSON type.
CREATE FUNCTION New_Funct ()
 RETURNS JSON(100)
 LANGUAGE SQL
CONTAINS SQL
DETERMINISTIC
SPECIFIC New_Funct
SQL SECURITY DEFINER
COLLATION INVOKER
INLINE TYPE 1
 RETURN (new JSON('[1,2,3]'));