-- ------------------------loop---------------------------
delimiter $DROP PROCEDURE IF EXISTS my_count $CREATE PROCEDURE my_count()BEGINDECLARE count INT DEFAULT 0;
my_loop:LOOPSET 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;