Bootstrap

Mysql语法

1,循环插入数据

DROP PROCEDURE IF EXISTS test_insert;
DELIMITER ;; 
CREATE PROCEDURE test_insert () 
BEGIN

DECLARE i INT DEFAULT 1;

while i<=10000
do

--插入语句


set i = i+1;
end while;
commit;
end;;

call test_insert();
DROP PROCEDURE IF EXISTS test_insert;

;