Each reference to a scalar or aggregate function (either built-in or user-defined) conforms to the following syntax: 34
function-invocation: (1) |--function-name--(--+----------+-------+----------------+--)---| +-ALL------+ | .-,----------. | '-DISTINCT-' | V | | '---expression-+-'
Each reference to a table function conforms to the following syntax:
>>-TABLE--(--function-name--(--+----------------+--)--)--correlation-clause->< | .-,----------. | | V | | '---expression-+-'
In the above syntax, expression is the same as it is for a scalar or aggregate function. See Expressions for other rules for expression.
When the function is invoked, the value of each of its parameters is assigned, using storage assignment, to the corresponding parameter of the function. Control is passed to external functions according to the calling conventions of the host language. When execution of a user-defined aggregate or scalar function is complete, the result of the function is assigned, using storage assignment, to the result data type. For details on the assignment rules, see Assignments and comparisons.
Table functions can be referenced only in the FROM clause of a subselect. For more details on referencing a table function, see the description of the FROM clause in from-clause.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.