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

Example of Iterate Mysql statement:

CREATE PROCEDURE doiterate(p1 INT)
BEGIN
label1: LOOP
SET p1 = p1 + 1;
IF p1 < 10 THEN ITERATE label1; END IF;
LEAVE label1;
END LOOP label1;
SET @x = p1;
END

Example of Mysql Iterate

ITERATE label