15.10 - RETURNS data type - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

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.