16.20 - RETURNS data type - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Teradata Database
Teradata Vantage NewSQL Engine
Release Number
March 2019
Content Type
Programming Reference
Publication ID
English (United States)
Last Update

Data type for the value returned by the SQL function.

This clause is mandatory for all SQL UDFs.

You cannot specify a character server data set of KANJI1. Otherwise, Teradata Database returns an error to the requestor.

You cannot specify a RETURNS data type of TD_ANYTYPE for an SQL UDF.

The function is responsible for providing the returned data with the correct type.

The result type has a dictionary entry in DBC.TVFields under the name RETURN0[n], where n is a sequence of digits appended to RETURN0 rows to make each value unique, ensuring that no user-defined parameter names are duplicated. The value of n is incremented until it no longer duplicates a parameter name.

The n subscript is not used if there is no parameter name of RETURN0.