Stored procedures
A procedure (often called a stored procedure) is a program that can be called to perform operations.
A procedure can include both host language statements and SQL statements. Procedures in SQL provide the same benefits as procedures in a host language.
Db2 stored procedure support provides a way for an SQL application to define and then call a procedure through SQL statements.
Coding stored procedures requires that the user understand the following:
- Stored procedure definition through the CREATE PROCEDURE statement
- Stored procedure invocation through the CALL statement
- Parameter passing conventions
- Methods for returning a completion status to the program invoking the procedure.