当前位置:网站首页>1.3 mysql批量插入数据
1.3 mysql批量插入数据
2022-08-05 05:05:00 【LetsStudy】
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();
边栏推荐
- App rapid development and construction experience: the importance of small programs + custom plug-ins
- 人性的弱点
- Develop your own node package
- phone call function
- RL强化学习总结(一)
- Dephi reverse tool Dede exports function name MAP and imports it into IDA
- UVA10827
- 数字孪生技术在电力系统中的应用现状
- LeetCode:1403. 非递增顺序的最小子序列【贪心】
- Cron(Crontab)--使用/教程/实例
猜你喜欢
随机推荐
How does the Flutter TapGestureRecognizer work
说说数据治理中常见的20个问题
flex布局青蛙游戏通关攻略
【无标题】
Flutter学习-开篇
Day14 jenkins deployment
Flutter learning - the beginning
Flutter Learning 4 - Basic UI Components
结构光三维重建(一)条纹结构光三维重建
Mvi架构浅析
MySQL Foundation (1) - Basic Cognition and Operation
Cron(Crontab)--使用/教程/实例
Qt produces 18 frames of Cupid to express his love, is it your Cupid!!!
dedecms error The each() function is deprecated
UVA10827
uboot开启调试打印信息
Dephi逆向工具Dede导出函数名MAP导入到IDA中
Flutter学习5-集成-打包-发布
Day019 Method overriding and introduction of related classes
number_gets the specified number of decimals