/* 使用begin end批量更新   注意end后面必须使用;结束 并且每条update语句都要用;来结束  所以close为;END; 是为了补全语法 */
<foreach collection="list" item="item" index= "index" open="BEGIN" close=";END;" separator =";">
update xxxx
<set>
xxxx = 100
</set>
<where>
ID = 'xxxx'
</where>
</foreach>

注意的点:

  1.begin end 必须成对出现

  2.end后面必须跟;结束

  3.每一条语句都要以;结束

所以close是 ;END; 是为了补全语法

参考[1]:https://blog.csdn.net/aaronmer/article/details/80576191

最新文章

  1. 遭遇OutOfMemoryError
  2. HDU 1576 (乘法逆元)
  3. Unity3D研究之Prefab里面的Prefab关联问题
  4. c# 隐藏 控制台应用程序
  5. 在Java中导出word、excel格式文件时JSP页面头的设置
  6. Eclipse安装SVN插件总结
  7. cocos2d-html5版日历组件
  8. intel线程库tbb的使用
  9. Git Version recovery command introduction - git reset
  10. C++中double类型的数字如何保留三位小数点详解
  11. Android studio签名与代码混淆
  12. WEB相关系列
  13. rabbitmq消费者“无故消失”
  14. Oracle 数据库基础知识
  15. Round #2
  16. linux重命名所有find查找到的文件/文件夹
  17. Linux From Scratch [3]
  18. c++ cout、&lt;&lt; 、cin、&gt;&gt; 、endl 详解
  19. sort命令的k选项大讨论【转】
  20. bzoj3932 任务查询系统

热门文章

  1. hihocoder 1331 扩展二进制数(递归)
  2. Codeforces630C【水题】
  3. hdoj5792 【树状数组】【未完待续】
  4. C# BitmapData使用说明
  5. Centos 搭建Mysql-Proxy 读写分离
  6. C++中的定位放置new(placement new)
  7. linux添加开机启动脚本
  8. python之文件的读写
  9. Linux下文件权限的设置
  10. 接口测试01 - HTTP协议报文结构及示例