An SQL stored procedure contains some or all of the following elements.
| Element | Description |
|---|---|
| SQL control statements | Nested or non-nested compound statements. |
| Control declarations |
|
| SQL transaction statements | DDL, DCL, DML, and SELECT statements, including dynamic SQL statements, with a few exceptions. |
| LOCKING modifiers | With all supported SQL statements except CALL. |
| Comments | Bracketed and simple comments. Nested bracketed comments are not allowed.
|
For more information, see SQL Stored Procedures as SQL Applications.