Chapter 30. Stored Procedures
This chapter is devoted to the procedural database object called the stored procedure or database procedure. We start by giving its definition:
A stored procedure is a certain piece of code (the procedure) consisting of declarative and procedural SQL statements stored in the catalog of a database that can be activated by calling it from a program, a trigger, or another stored procedure.
Thus, a stored procedure is a piece of code. This code can consist of declarative SQL statements, such as
SELECT, possibly complemented with procedural statements, such as
WHILE-DO. The code from which a stored procedure has been built is, therefore, not a part of a program, but is stored ...