drop procedure if exists BulkInsert;
DELIMITER //
CREATE PROCEDURE BulkInsert()
BEGIN
DECLARE i INT DEFAULT 1;
WHILE (i <= 100) DO
INSERT INTO tableName (label, links) VALUES ('label1', null);
INSERT INTO tableName (label, links) VALUES ('label2', null);
INSERT INTO tableName (label, links) VALUES ('label3', '1,2');
SET i = i+1;
END WHILE;
END;
//
CALL BulkInsert();
1条答案
按热度按时间nzkunb0c1#
试试这个。。。