15.00 - HELP FUNCTION - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1184-015K
Language
English (United States)

HELP FUNCTION

User‑Defined Function Attributes

The following attributes and format information are returned for each parameter in a user‑defined function (UDF). The report returned for external functions and SQL functions is the same.

Note: For a table function defined with a dynamic row result specification, HELP FUNCTION returns only input parameters because the maximum number of output parameters for the function cannot be known before it runs. Because of this, the names and data types for the output parameters also cannot be defined until run time.

 

Attribute

Data Type

Nullable?

Description

Parameter Name

VARCHAR(30)

No

The name of a parameter defined for the UDF specified in the HELP Function request.

A parameter name and set of attributes is returned for each parameter in the specified UDF.

Note: The word RETURN0 is a system‑generated return parameter name.

Type

CHARACTER(2)

No

The data for the reporting parameter.

See “Data Type Codes” on page 901 for a list of the data type codes and their meanings.

Comment

CHARACTER(255)

Yes

The contents of the optional comment field for the function, if a comment was created.

Nullable

CHARACTER(1)

No

Specifies whether the parameter is nullable.

  • N specifies NOT NULL.
  • Y specifies nullable.
  • Format

    CHARACTER(30)

    Yes

    Display format for the data type.

    For a UDT, the displayed format is the format associated with the external type of the UDT.

    Data type display formats are documented in “Data Type Formats and Format Phrases” in SQL Data Types and Literals.

    Max Length

    INTEGER

    No

    The column format is -(10)9.

    When the parameter data type is a UDT, this column is 0.

    Decimal Total Digits

    SMALLINT

    Yes

    If type is DECIMAL.

    Decimal Fractional Digits

    SMALLINT

    Yes

    If type is DECIMAL.

    Table/View?

    CHARACTER(1)

    No

    The function type:

  • A specifies Aggregate function.
  • B specifies a combined Aggregate and Statistical function.
  • E specifies external procedure.
  • F specifies Scalar function.
  • M specifies Function used as a method.
  • R specifies Table function.
  • S specifies Statistical function.
  • Character Type

    SMALLINT

    Yes

    Returns a code identifying the character data type for the parameter.

  • 1 specifies LATIN server character data type columns.
  • 2 specifies UNICODE server character data type columns.
  • 3 specifies KANJISJIS server character data type columns.
  • 4 specifies GRAPHIC server character data type columns.
  • 5 specifies KANJI1 server character data type columns.
  • If the data type of the column is not character, returns null.

    Parameter Type

    CHARACTER(2)

    No

    The type of parameter specified by the Parameter Name field.

  • C specifies a Return column of a function table.
  • E specifies an External OUT parameter.
  • I specifies an IN parameter.
  • O specifies an OUT parameter.
  • UT specifies UDT parameter
  • UDT Name

    VARCHAR(61)

    Yes

    Returns the unqualified name of the UDT for the Parameter Name.

    If a UDT does not exist, the parameter is NULL.

    Parameter Dictionary Name

    VARCHAR(128)

    No

    The attributes shown in this section are derived from and supersede the corresponding older Parameter Name and UDT Name attributes, while providing additional functionality.

    The older attributes are retained for compatibility with legacy applications.

    For details on the new attributes, see the topics beginning with “Working with Object Name and Title Data in HELP Reports” on page 896.

    Parameter SQL Name

    VARCHAR(644)

    Parameter Name UEscape

    VARCHAR(1)

    Yes

    UDT Dictionary Name

    VARCHAR(128)

    Yes

    UDT SQL Name

    VARCHAR(644)

    Yes

    UDT Name UEscape

    VARCHAR(1)

    Yes