MySQL 5.7 Release Notes
MySQL supports theIF
,CASE
,ITERATE
,LEAVE
LOOP
,WHILE
, andREPEAT
constructs for flow control within stored programs. It also supportsRETURN
within stored functions.
Many of these constructs contain other statements, as indicated by the grammar specifications in the following sections. Such constructs may be nested. For example, anIF
statement might contain aWHILE
loop, which itself contains aCASE
statement.
MySQL does not supportFOR
循环。