SQL Language Guide : 7. Database Procedures, Sessions, and Events
 
Share this page                  
Database Procedures, Sessions, and Events
 
How Database Procedures Are Created, Invoked, and Executed
Multiple Session Connections
Database Events
How Database Procedures Are Created, Invoked, and Executed
A database procedure is a named routine composed of SQL statements stored in a database.
Database procedures are created using the CREATE PROCEDURE statement and dropped using the DROP PROCEDURE statement.
Database procedures can be called or invoked in the following ways:
From an embedded SQL program
From interactive SQL
From a 4GL program
A database procedure query execution plan is created at the time the procedure is created. If objects named in the procedure are modified in a way that invalidates the query execution plan, the DBMS Server recreates the query execution plan the next time the procedure is invoked.