Rechercher dans le manuel MySQL
13.6.2 Statement Label Syntax
- [statement_list]
- [begin_label:] LOOP
- statement_list
- statement_list
- UNTIL search_condition
- statement_list
Labels are permitted for
BEGIN ... END
blocks and for the LOOP
,
REPEAT
, and
WHILE
statements. Label use for
those statements follows these rules:
begin_label
must be followed by a colon.begin_label
can be given withoutend_label
. Ifend_label
is present, it must be the same asbegin_label
.end_label
cannot be given withoutbegin_label
.Labels at the same nesting level must be distinct.
Labels can be up to 16 characters long.
To refer to a label within the labeled construct, use an
ITERATE
or
LEAVE
statement. The following
example uses those statements to continue iterating or terminate
the loop:
The scope of a block label does not include the code for handlers declared within the block. For details, see Section 13.6.7.2, “DECLARE ... HANDLER Syntax”.
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-statement-labels.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.