DROP PROCEDURE
IF EXISTS test_data;
DELIMITER $$ //定界符
CREATE PROCEDURE test_data()
BEGIN
-- 定义变量
DECLARE i INT UNSIGNED DEFAULT 1; -- 定义变量i默认值
-- 循环次数
WHILE i <= 1000 DO -- 循环
INSERT INTO testdata_check(id,crawl_cfg_id,detection_type,crawl_file_info_id,task_instance_id,crawl_content) VALUES(CONCAT('17ac3e7419954b63878157491a4e8d42',i),'2','5',null,'1f9d7b13c0174dc0aa52f00a53014acf','{"url": "http://www.beijing.gov.cn/shipin/Interviewlive/558.html", "title": "北京市新型冠状病毒肺炎疫情防控工作新闻发布会(第253场)", "author": "", "domain": "beijing.gov.cn", "islist": "False", "content": "Reset
restore all settings to the default values", "send_time": "2022-07-29 17:32:52", "create_time": "2022-07-29 17:32:52", "islist_code": 0.1447209933229973, "publish_time": "2021-11-01"}');
SET i = i+1; -- 更新i的值
END WHILE; -- 结束循环
END $$
--
CALL test_data();