I\'m working through learning MySQL (v 5.6) and trying to get a simple WHILE loop to go through. I even just straight copy & paste from the manual (with add
WHILE
The procedure looks ok I guess you are missing the delimiter
delimiter // CREATE PROCEDURE dowhile() BEGIN DECLARE v1 INT DEFAULT 5; WHILE v1 > 0 DO SET v1 = v1 - 1; END WHILE; END; // delimiter ;