Oracle批量更新数据,使用begin end
2024-08-30 12:34:49
/* 使用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
最新文章
- 遭遇OutOfMemoryError
- HDU 1576 (乘法逆元)
- Unity3D研究之Prefab里面的Prefab关联问题
- c# 隐藏 控制台应用程序
- 在Java中导出word、excel格式文件时JSP页面头的设置
- Eclipse安装SVN插件总结
- cocos2d-html5版日历组件
- intel线程库tbb的使用
- Git Version recovery command introduction - git reset
- C++中double类型的数字如何保留三位小数点详解
- Android studio签名与代码混淆
- WEB相关系列
- rabbitmq消费者“无故消失”
- Oracle 数据库基础知识
- Round #2
- linux重命名所有find查找到的文件/文件夹
- Linux From Scratch [3]
- c++ cout、<;<; 、cin、>;>; 、endl 详解
- sort命令的k选项大讨论【转】
- bzoj3932 任务查询系统