Examples for business, study, careers, love, and more...
Examples :: MYSQL Examples :: Example of Repeat Mysql statement

Example of Repeat Mysql statement:

CREATE PROCEDURE dorepeat(p1 INT)
BEGIN
SET @x = 0;
REPEAT SET @x = @x + 1; UNTIL @x > p1 END REPEAT;
END
CALL dorepeat(1000)
SELECT@x

Example of Mysql Repeat

[begin_label:] REPEAT
statement_list
UNTIL search_condition
END REPEAT [end_label]