Documentation Home
MySQL 9.1 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.4Mb
PDF (A4) - 40.5Mb
Man Pages (TGZ) - 259.5Kb
Man Pages (Zip) - 366.7Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb


MySQL 9.1 Reference Manual  / ...  / SQL Statements  / Compound Statement Syntax  /  Flow Control Statements

15.6.5 Flow Control Statements

MySQL supports theIF,CASE,ITERATE,LEAVELOOP,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 loops.