15.10 - data type - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Teradata Database
Release Number
December 2015
Content Type
Programming Reference
Publication ID
English (United States)
Last Update

A parenthetical comma-separated list of data types and optional parameter names for the variables to be passed to the function.

The maximum number of parameters a method accepts is 128.

data type AS LOCATOR
BLOB and CLOB types must be represented by a locator. For a description of locators, see SQL Data Manipulation Language, B035-1146.
You cannot specify in-memory LOB parameters. An AS LOCATOR phrase must be specified for each LOB parameter and return value.
parameter_name data type
Whenever an LOB that requires data type conversion is passed to a method, the LOB must first be materialized for the conversion to take place.
You must specify opening and closing parentheses even if no parameters are to be passed to the function.
parameter_name data type AS LOCATOR
]If you specify one parameter name, then you must specify names for all the parameters to be passed.
If you do not specify parameter names, the system assigns unique names to them in the form P1, P2, …, Pn. These names are used in the COMMENT statement, displayed in the report produced by the HELP METHOD statement, and appear in the text of error messages.
See COMMENT (Comment Placing Form).
The data type associated with each parameter is the type of the parameter or returned value. All Teradata Database predefined data types and UDTs (except for the DYNAMIC type) are valid. If you specify a UDT, then the current user of the method must have one of the following privilege sets:
  • UDTUSAGE on the specified UDT.
Character data can also specify a CHARACTER SET clause.
For data types that take a length or size specification, like BYTE, CHARACTER, DECIMAL, VARCHAR, and so on, the size of the parameter indicates the largest number of bytes that can be passed.
You cannot specify VARIANT_TYPE as a parameter data type for a method.
If the external routine for the method is written in C or C++, you can specify TD_ANYTYPE as a parameter data type.