Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Other Syntax Segments > Return Clause >

Subset of SQL Data Types

Not all data types are valid in the Return clause. For more information, see the table that follows. See also Data Type.

A user-defined function of Extended Parallel Server can return values of any built-in data type except SERIAL, SERIAL8, TEXT, or BYTE.

In Dynamic Server, a UDF can return values of any built-in data type except the complex, serial, and large object types that are not blank in the following table.

Data Type C Java SPL
BLOB X X
BYTE X X X
COLLECTION X
CLOB X X
LIST X
MULTISET X
ROW X X
SET X X
SERIAL X X X
SERIAL8 X X X
TEXT X X X

In Dynamic Server, if you use a complex data type in the Return clause, the calling user-defined routine must define variables of the appropriate complex types to hold the values that the C or SPL user-defined function returns.

User-defined functions can return a value of opaque or distinct data types that are defined in the database.

The default precision of a DECIMAL that an SPL function returns is 16 digits. For a function to return a DECIMAL with a different number of significant digits, you must specify the returned precision explicitly in the Return clause.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]