当前位置:网站首页>项目中批量update
项目中批量update
2022-07-05 15:26:00 【小蚂蚁hjk】
业务场景是,每条修改的值都不相同
dao
xml:
做到这一步还没有完;此时mysql还不支持批量修改会报错
Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE weibo_content
SET
EMOTION = 0.0
W' at line 7
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE weibo_content
当时一直以为是自己的语法有误其实不是的,这是因为配置数据源的时候缺少配置
&allowMultiQueries=true这条语句允许一次提交多条sql语句。特别是分号;
完美解决,还是百度发现的
边栏推荐
猜你喜欢
Redis' transaction mechanism
五种常见的咨询公司谈判策略以及如何维护自己的利益
vlunhub- BoredHackerBlog Moriarty Corp
18.[stm32] read the ROM of DS18B20 temperature sensor and realize multi-point temperature measurement
Bugku cyberpunk
Appium自动化测试基础 — APPium基础操作API(二)
Example project: simple hexapod Walker
Li Kou today's question -729 My schedule I
MySQL overview
16.[STM32]从原理开始带你了解DS18B20温度传感器-四位数码管显示温度
随机推荐
SQL Server learning notes
五种常见的咨询公司谈判策略以及如何维护自己的利益
I spring and autumn blasting-2
vlunhub- BoredHackerBlog Moriarty Corp
修改pyunit_time使得其支持‘xx~xx月’的时间文本
MySQL table field adjustment
Arduino controls a tiny hexapod 3D printing robot
Data communication foundation OSPF Foundation
Codasip为RISC-V处理器系列增加Veridify安全启动功能
Definition of episodic and batch
episodic和batch的定义
Example project: simple hexapod Walker
[brief notes] solve the problem of IDE golang code red and error reporting
Bugku's Ah Da
Quick completion guide for manipulator (IX): forward kinematics analysis
JS knowledge points-01
OSI seven layer model
定义严苛标准,英特尔Evo 3.0正在加速PC产业升级
The difference between SQL Server char nchar varchar and nvarchar
lvgl 显示图片示例