NDB supports the writing and executing of Natural stored procedures and Natural user-defined functions (Natural UDFs).
Natural stored procedures are user-written programs that are invoked by the SQL statement CALL and executed by DB2 in the SPAS (Stored Procedure Address Space). SPAS is a separate address space reserved for stored procedures.
A function is an operation denoted by a function name followed by zero or more operands that are enclosed in parentheses. A function represents a relationship between a set of input values and a set of result values. If a function has been implemented by a user-written program, DB2 refers to it as a user-defined function (UDF).
This section covers the following topics:
|
Types of Natural UDF |
|
PARAMETER STYLE |
|
Writing a Natural Stored Procedure |
|
Writing a Natural UDF |
|
Example Stored Procedure |
|
Example UDF |
|
Security |