loop
-- ------------------------loop---------------------------
delimiter $
DROP PROCEDURE IF EXISTS my_count $
CREATE PROCEDURE my_count()
BEGIN
DECLARE count INT DEFAULT 0;
my_loop:
LOOP
SET count=count+1;
IF(count=10) THEN
LEAVE my_loop;
END IF;
SELECT CONCAT(count," is select value ");
END LOOP ;
SELECT "i can count TO 10";
END $
delimiter;
CALL my_count();
DROP PROCEDURE my_count;