当前位置:网站首页>项目中批量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语句。特别是分号;
完美解决,还是百度发现的
边栏推荐
- Arduino控制微小的六足3D打印机器人
- Summary of the second lesson
- MySQL 巨坑:update 更新慎用影响行数做判断!!!
- Creation and optimization of MySQL index
- DataArts Studio数据架构——数据标准介绍
- Interval DP (gravel consolidation)
- Appium自动化测试基础 — APPium基础操作API(二)
- F. Weights assignment for tree edges problem solving Report
- 一文搞定vscode编写go程序
- Optional parameters in the for loop
猜你喜欢

verilog实现计算最大公约数和最小公倍数

vulnhub-Root_ this_ box

lv_ font_ Conv offline conversion
![18.[STM32]读取DS18B20温度传感器的ROM并实现多点测量温度](/img/e7/4f682814ae899917c8ee981c05edb8.jpg)
18.[STM32]读取DS18B20温度传感器的ROM并实现多点测量温度

Ionic Cordova project modification plug-in

Detailed explanation of QT creator breakpoint debugger

Information collection of penetration test

Advanced level of static and extern

SQL injection sqllabs (basic challenges) 1-10

Intelligent metal detector based on openharmony
随机推荐
记录一下树莓派搭建环境中遇到的坑。。。
lv_font_conv离线转换
P6183 [USACO10MAR] The Rock Game S
Anti shake and throttling
MySQL表字段调整
Bubble sort, insert sort
Linear DP (basic questions have been updated)
Data communication foundation - Ethernet port mirroring and link aggregation
Six common transaction solutions, you sing, I come on stage (no best, only better)
Data communication foundation - routing communication between VLANs
21.[STM32]I2C协议弄不懂,深挖时序图带你编写底层驱动
Usage and usage instructions of JDBC connection pool
MySQL table field adjustment
Fundamentals of data communication - Principles of IP routing
五种常见的咨询公司谈判策略以及如何维护自己的利益
1330: [example 8.3] minimum steps
Misc Basic test method and knowledge points of CTF
I spring web upload
一文搞定vscode编写go程序
Common MySQL interview questions (1) (written MySQL interview questions)