DML Statements with Parameters
Transactions
The Module Header
The PSQL Module Body
The External Module Body
Benefits of Stored Procedures
Executable Procedures
Selectable Procedures
Creating a Stored Procedure
Modifying a Stored Procedure
Dropping a Stored Procedure
Creating a Stored Function
Modifying a Stored Function
Dropping a Stored Function
PSQL Blocks
Benefits of Packages
Creating a Package
Modifying a Package
Dropping a Package
Firing Order (Order of Execution)
Trigger Options
OLD
Database Triggers
Semantics
The
Creating Triggers
Modifying Triggers
Dropping a Trigger
Example using assignment statements
Example of Management Statements in PSQL
Data Type for Variables
NOT NULL
CHARACTER SET
Initializing a Variable
Examples of various ways to declare local variables
Cursor Idiosyncrasies
Examples Using Named Cursors
Examples of Sub-Functions
Examples of Sub-Procedures
BEGIN … END
IF
WHILE … DO
BREAK
LEAVE
CONTINUE
EXIT
SUSPEND
Examples of
WITH {AUTONOMOUS | COMMON} TRANSACTION
WITH CALLER PRIVILEGES
Transaction Pooling
Exception Handling
Miscellaneous Notes
AS USER
Caveats with
The Undeclared Cursor
Examples using
FOR EXECUTE STATEMENT
OPEN
FETCH
CLOSE
IN AUTONOMOUS TRANSACTION
POST_EVENT
RETURN
System Exceptions
Custom Exceptions
EXCEPTION
Scope of a