mysql批量插入100000条数据
DROP PROCEDURE IF EXISTS my_insert;CREATE PROCEDURE my_insert()BEGINDECLARE n int DEFAULT 1;loopname:LOOPINSERT INTO test_tbl(id,dr)VALUES(n,'lilis');SET n=n+...
·
DROP PROCEDURE IF EXISTS my_insert;
CREATE PROCEDURE my_insert()
BEGIN
DECLARE n int DEFAULT 1;
loopname:LOOP
INSERT INTO test_tbl(id,dr)VALUES(n,'lilis');
SET n=n+1;
IF n=100000 THEN
LEAVE loopname;
END IF;
END LOOP loopname;
END;
CALL my_insert();
更多推荐
已为社区贡献2条内容
所有评论(0)