1 向数据库中插入1000条记录

use db1;
DROP PROCEDURE IF EXISTS proc_initData;

DELIMITER $
CREATE PROCEDURE proc_initData()
BEGIN
DECLARE i INT DEFAULT 1;
WHILE i<=1000 DO
INSERT INTO feed(user_id,identity,content) VALUES('1','1','哈哈');
SET i = i+1;
END WHILE;
END $

DELIMITER ;

CALL proc_initData();

posted on 2020-04-28 11:24  彭泡芙  阅读(2404)  评论(0编辑  收藏  举报