[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
WHILE
Statement
[begin_label:] WHILE search_condition DO statement(s) END WHILE [end_label] |
The 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 |