Chapter 31. Stored Functions
Stored functions show a strong resemblance to stored procedures. Stored functions are also pieces of code consisting of SQL and procedural statements that are stored in the catalog and can be called from applications and SQL statements. However, there are a few differences.
A stored function can have input parameters but does not have output parameters. The stored function itself is the output parameter. In the next sections, we use examples to illustrate this.
After stored functions have been created, they can be called within several expressions, just as the familiar scalar functions. Therefore, we do not call stored functions using a
Stored functions must contain a
RETURN statement. This ...