## 13.6 Compound Statement Syntax

[13.6.1 BEGIN ... END Compound Statement](begin-end.html)
[13.6.2 Statement Labels](statement-labels.html)
[13.6.3 DECLARE Statement](declare.html)
[13.6.4 Variables in Stored Programs](stored-program-variables.html)
[13.6.5 Flow Control Statements](flow-control-statements.html)
[13.6.6 Cursors](cursors.html)
[13.6.7 Condition Handling](condition-handling.html)
[13.6.8 Restrictions on Condition Handling](condition-handling-restrictions.html)

[]()[]()[]()[]()

 This section describes the syntax for the [`BEGIN ... END`](begin-end.html) compound statement and other statements that can be used in the body of stored programs: Stored procedures and functions, triggers, and events. These objects are defined in terms of SQL code that is stored on the server for later invocation (see [Chapter 25, *Stored Objects*](stored-objects.html)).

 A compound statement is a block that can contain other blocks; declarations for variables, condition handlers, and cursors; and flow control constructs such as loops and conditional tests.

