13.6 Compound-Statement Syntax
This section describes the syntax for the BEGIN ... END compound statement and other statements that can be used in the body of stored programs: Stored procedures and functions, trigger, and events. These objects are defined in iterms of SQL code that is stored on the server for later invocation(see Chapter 23, Stored Programs and Views).
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 test.