Description\n-----------\n\nSyntax\n\n``sql\nITERATE label\n`\n\nITERATE can appear only within LOOP, REPEAT, and WHILE statements.ITERATE means "do the loop again", and uses the statement's label to determine which statements to repeat. The label must be in the same stored program, not in a caller procedure.\n\nIf you try to use ITERATE with a non-existing label, or if the label is associated to a construct which is not a loop, the following error will be produced:\n\n`sql\nERROR 1308 (42000): ITERATE with no matching label: <label_name>\n`\n\nBelow is an example of how ITERATE might be used:\n\n`sql\nCREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n  label1: LOOP\n    SET p1 = p1 + 1;\n    IF p1 < 10 THEN ITERATE label1; END IF;\n    LEAVE label1;\n  END LOOP label1;\n  SET @x = p1;\nEND\n``\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/programmatic-compound-statements/iterate