ASA SQL User's Guide
Using Procedures, Triggers, and Batches
The structure of procedures and triggers
User-defined functions are not invoked with the CALL statement, but are used in the same manner that built-in functions are. For example, the following statement uses the fullname function defined in Creating user-defined functions to retrieve the names of employees:
To list the names of all employees
Type the following:
SELECT fullname(emp_fname, emp_lname) AS Name FROM employee
Name |
---|
Fran Whitney |
Matthew Cobb |
Philip Chin |
Julie Jordan |
... |
Default parameters can be used in calling functions. However, parameters cannot be passed to functions by name.
Parameters are passed by value, not by reference. Even if the function changes the value of the parameter, this change is not returned to the calling environment.
Output parameters cannot be used in user-defined functions.
User-defined functions cannot return result sets.