(mysql.info.gz) WHILE Statement
Info Catalog
(mysql.info.gz) REPEAT Statement
(mysql.info.gz) Flow Control Constructs
19.1.9.7 `WHILE' Statement
..........................
[BEGIN_LABEL:] WHILE SEARCH_CONDITION DO
STATEMENT_LIST
END WHILE [END_LABEL]
The statement or statements within a `WHILE' statement are repeated as
long as the SEARCH_CONDITION is true.
BEGIN_LABEL and END_LABEL must be the same, if both are specified.
For example:
CREATE PROCEDURE dowhile()
BEGIN
DECLARE v1 INT DEFAULT 5;
WHILE v1 > 0 DO
...
SET v1 = v1 - 1;
END WHILE;
END
Info Catalog
(mysql.info.gz) REPEAT Statement
(mysql.info.gz) Flow Control Constructs
automatically generated byinfo2html