Definition of a Table Function
A table function is a user‑defined function that returns a multirow relational table, one row at a time to the SELECT request that calls it. You define the structure of the table to be returned in one of two ways:
The complete set of column names and their accompanying data types defines the structure of the table the function returns to the caller.
If one of the specified columns has a LOB data type, then you must define at least one other non-LOB column.
Each column name is limited to a maximum of 128 UNICODE characters, with the same restrictions as other object identifiers. For information on object naming, see SQL Fundamentals.
The maximum number of columns you can specify is 2,048 for both the static and dynamic forms of table function.
The returned table is derived from an external source, typically a native operating system file, message queue, or input argument such as a LOB, and is semantically similar to a derived table. See SQL Data Manipulation Language.
Table functions are different from non‑table UDFs because they return an entire table to the calling statement, while a non‑table UDF returns only a single scalar result.