Skip to main content

Loops in Procedures

Learn Loops in Procedures (Stored Procedures, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Introduction MySQL has three loop forms. WHILE cond DO ... END WHILE tests before each pass. REPEAT ... UNTIL cond END REPEAT tests after (runs at least once). LOOP ... END LOOP runs forever until you LEAVE its label; ITERATE skips to the next pass.

More lessons in Stored Procedures