Creating Procedures
From InterBase
Go Up to Working with Stored Procedures
You can define a stored procedure with the CREATE PROCEDURE
statement in isql. You cannot create stored procedures in embedded SQL. A stored procedure is composed of a header and a body.
The header contains:
- The name of the stored procedure, which must be unique among procedure, view, and table names in the database.
- An optional list of input parameters and their data types that a procedure receives from the calling program.
- If the procedure returns values to the calling program,
RETURNS
followed by a list of output parameters and their data types.
The procedure body contains:
- An optional list of local variables and their data types.
- A block of statements in InterBase procedure and trigger language, bracketed by
BEGIN
andEND
. A block can itself include other blocks, so that there can be many levels of nesting.