15.00 - Parameter Style Clause - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

Teradata Database
Release Number
Content Type
Programming Reference
Publication ID
English (United States)

Parameter Style Clause

This optional clause specifies the parameter passing style to be used by the function. Teradata Database supports three parameter passing styles for user‑defined functions:

  • SQL
  • JAVA
  • The following rules apply to the parameter styles specified for row‑level security policy functions.

  • The SQL parameter style defines that each input and the output parameter for the UDF has a second indicator parameter.
  • The SQL parameter style enables the C or C++ code body to indicate null data.

    The set of indicator parameters in the C or C++ definition of the UDF follows the set of corresponding value parameters. The indicator parameters must be in the same order as the value parameters.


    IF the indicator parameter value is …

    THEN its corresponding value parameter is …




    is not null.

    No other values are acceptable for an indicator parameter.

  • The TD_GENERAL parameter style defines that there are no indicator parameters for the UDF parameters.
  • The TD_GENERAL parameter style does not enable the code body to indicate null data.

  • The JAVA parameter style is not supported for row‑level security policy functions.
  • The SQL parameter style allows the code body to indicate null data. This cannot be done with the TD_GENERAL parameter style.

    You can specify the parameter style clause in one of two places:

  • SQL data access clause
  • External function name
  • You cannot specify the parameter style both places in the same user‑defined function definition statement. Only one parameter style clause is permitted per UDF definition.

    See “General Rules for Row‑Level Security Function Parameter Styles” on page 262 for parameter style information that is specific to row‑level security constraint UDFs.

    Specific details of both options are described in SQL External Routine Programming.