Procedures and Triggers
Go Up to Language Reference Guide
InterBase procedure and trigger language is a complete programming language for writing stored procedures and triggers in isql
and DSQL. It includes:
- SQL data manipulation statements:
INSERT
,UPDATE
,DELETE
, and singletonSELECT
. - Powerful extensions to SQL, including assignment statements, control-flow statements, context variables, event-posting, exceptions, and error handling.
Although stored procedures and triggers are used in entirely different ways and for different purposes, they both use procedure and trigger language. Both triggers and stored procedures can use any statements in procedure and trigger language, with some exceptions:
OLD
andNEW
context variables are unique to triggers.- Input and output parameters, and the
SUSPEND
andEXIT
statements are unique to stored procedures.
The Data Definition Guide explains how to create and use stored procedures and triggers. This chapter is a reference for the statements that are unique to trigger and procedure language or that have special syntax when used in triggers and procedures.
Topics
- Creating Triggers and Stored Procedures
- Statement Types Not Supported
- Nomenclature Conventions
- Assignment Statement
- BEGIN … END
- Comment
- DECLARE VARIABLE
- EXCEPTION
- EXECUTE PROCEDURE (Procedures)
- EXECUTE STATEMENT
- FOR SELECT…DO
- IF…THEN … ELSE
- Input Parameters (Procedures)
- NEW Context Variables
- OLD Context Variables
- Output Parameters (Procedures)
- POST_EVENT
- SELECT (Procedures)
- SUSPEND
- WHEN … DO
- WHILE … DO