Using CREATE PROCEDURE Versus CREATE FUNCTION

Although you can use CREATE PROCEDURE to write and register an SPL routine that returns one or more values (that is, an SPL function)In HCL OneDB™, it is recommended that you use CREATE FUNCTION instead. To register an external function, you must use CREATE FUNCTION.

Use the CREATE PROCEDURE statement to write and register an SPL procedure or to register an external procedure.

For information on how terms such as user-defined procedures and user-defined functions are used in this document, see Relationship Between Routines, Functions, and Procedures.