标签:code while creat nbsp mysql procedure values cal bat
假设t_table1只有id和name2个字段
新建存储过程
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();
标签:code while creat nbsp mysql procedure values cal bat
原文地址:https://www.cnblogs.com/zengnansheng/p/11176294.html