mysql通过查询造10000条测试数据

DROP PROCEDURE IF EXISTS proc_initData;
DELIMITER $
CREATE PROCEDURE proc_initData()
BEGIN
DECLARE i INT DEFAULT 1;
WHILE i<=10000 DO
INSERT INTO 表名(id) VALUES(i);
SET i = i+1;
END WHILE;
END $
CALL proc_initData()

你可能感兴趣的:(mysql)