[begin_label:] WHILE search_condition DO statement(s) END WHILE [end_label]
Les commandes dans l'instruction WHILE
sont
répétées tant que la condition
search_condition
est vraie.
begin_label
et end_label
doivent être identiques, s'ils sont spécifiés.
Par exemple :
CREATE PROCEDURE dowhile() BEGIN DECLARE v1 INT DEFAULT 5; WHILE v1 > 0 DO ... SET v1 = v1 - 1; END WHILE; END
This is a translation of the MySQL Reference Manual that can be found at dev.mysql.com. The original Reference Manual is in English, and this translation is not necessarily as up to date as the English version.