DROP PROCEDURE IF EXISTS test_insert; DELIMITER ;; CREATE PROCEDURE test_insert () BEGIN DECLARE i int; set i=14; WHILE i<30 DO insert into student(name,age,nianji,phone) values(CONCAT('hh',i),CONCAT(i,''),'1','123'); SET i=i+1; END WHILE ; commit; END;; call test_insert () ;