DROP PROCEDURE test_insert ;
DELIMITER ;;#声明;;为结束标志
CREATE PROCEDURE test_insert ()
BEGIN
DECLARE i INT;
set i=0;
WHILE i<10
DO
INSERT INTO user
(
user_id,
user_name
)
VALUES
(
CONCAT('041431',i),
CONCAT('name',i)
);
SET i=i+1;
END WHILE ;
END;;
CALL test_insert();;