User-defined routines
A UDR can either return values or not, as follows:
- A user-defined function returns one or more values
and therefore can be used in SQL expressions.
Use the CREATE FUNCTION statement to register the UDR in the system catalog tables.
- A user-defined procedure is a routine that does not
return any values. You cannot use a procedure in SQL expressions because
it does not return a value.
Use the CREATE PROCEDURE statement to register the UDR in the system catalog tables.