MySQL 8.4 Release Notes
- 15.6.1 BEGIN ... END 复合语句15.6.1 BEGIN ... END Compound Statement
- 15.6.2 语句标签15.6.2 Statement Labels
- 15.6.3 DECLARE 语句15.6.3 DECLARE Statement
- 15.6.4 存储程序中的变量15.6.4 Variables in Stored Programs
- 15.6.5 流程控制语句15.6.5 Flow Control Statements
- 15.6.6 游标15.6.6 Cursors
- 15.6.7 条件处理15.6.7 Condition Handling
- 15.6.8 条件处理的限制15.6.8 Restrictions on Condition Handling
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, triggers, and
events. These objects are defined in terms of SQL code that is
stored on the server for later invocation (see
Chapter 27, Stored Objects).
复合语句是一个代码块,可以包含其他代码块;变量、条件处理程序和游标的声明;以及如循环和条件测试等流程控制结构。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.