CREATE PROCEDURE dowhile() BEGIN DECLARE n int; set n=1; WHILE n=1000 do INSERT into hasindex(num) VALUES (n); set n=n1; END WHILE; END; CALL dowhile();
CREATE PROCEDURE dowhile()
BEGIN
DECLARE n int;
set n=1;
WHILE n
do
INSERT into hasindex(num) VALUES (n);
set n=n+1;
END WHILE;
END;
CALL dowhile();