July 30, 2010, Friday, 210


Procedure Structure

From SQL PL Guide for DB2

(Redirected from Create procedure)
Jump to: navigation, search

DB2 Stored Procedure structure

A stored procedure in DB2 has the following structure:

 CREATE PROCEDURE <procname> [ ( {optional parameters} ) ]
 [{optional procedure attributes}]
 BEGIN [atomic]
   ... statements ...
 END


The following optional procedure attributes are supported:


A procedure can be defined as ATOMIC or NON-ATOMIC procedure.

The declaration of variables, the statements, and procedure logic is placed in the procedure body.


Example:

...coming soon...




Link to the DB2 Information Center: DB2 9 DB2 9.5