时间:2021-07-01 10:21:17 帮助过:4人阅读
新建存储过程
DROP PROCEDURE IF EXISTS pro_batchInsert; CREATE PROCEDURE pro_batchInsert() BEGIN DECLARE i INT DEFAULT 1; WHILE i<=10000 DO INSERT INTO t_table1(name) VALUES(concat(‘名称‘,i)); SET i = i+1; END WHILE; END
调用
CALL pro_batchInsert();
Mysql批量插入大量数据
标签:code while creat nbsp mysql procedure values cal bat