MySQL :: MySQL 8.4 Reference Manual :: 15.6.5 Flow Control Statements (original) (raw)
15.6.5 Flow Control Statements
MySQL supports the IF,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 support FOR
loops.