Firebird Documentation IndexFirebird 2.5 Language Reference → Procedural SQL (PSQL) Statements
Firebird Home Firebird Home Prev: EXECUTE BLOCKFirebird Documentation IndexUp: Firebird 2.5 Language ReferenceNext: Elements of PSQL

Chapter 7: Procedural SQL (PSQL) Statements

Table of Contents

Elements of PSQL
DML Statements with Parameters
Transactions
Module Structure
Stored Procedures
Benefits of Stored Procedures
Types of Stored Procedures
Creating a Stored Procedure
Modifying a Stored Procedure
Deleting a Stored Procedure
Stored Functions
PSQL Blocks
Triggers
Firing Order (Order of Execution)
DML Triggers
Database Triggers
Creating Triggers
Modifying Triggers
Deleting a Trigger
Writing the Body Code
Assignment Statements
DECLARE CURSOR
DECLARE VARIABLE
BEGIN ... END
IF ... THEN ... ELSE
WHILE ... DO
LEAVE
EXIT
SUSPEND
EXECUTE STATEMENT
FOR SELECT
FOR EXECUTE STATEMENT
OPEN
FETCH
CLOSE
IN AUTONOMOUS TRANSACTION
POST_EVENT
Trapping and Handling Errors
System Exceptions
Custom Exceptions
EXCEPTION
WHEN ... DO

Procedural SQL (PSQL) is a procedural extension of SQL. This language subset is used for writing stored procedures, triggers, and PSQL blocks.

PSQL provides all the basic constructs of traditional structured programming languages, and also includes DML statements (SELECT, INSERT, UPDATE, DELETE, etc.), with slight modifications to syntax in some cases.

Prev: EXECUTE BLOCKFirebird Documentation IndexUp: Firebird 2.5 Language ReferenceNext: Elements of PSQL
Firebird Documentation IndexFirebird 2.5 Language Reference → Procedural SQL (PSQL) Statements