mybatis delect foreach
时间: 2023-10-17 12:58:52 浏览: 157
测试mybatis里foreach用法
MyBatis中的foreach用于在删除操作中进行循环迭代。通过指定一个集合对象作为参数,并使用foreach元素包裹SQL语句,可以方便地删除多个目标数据。
在使用foreach元素时,需要指定collection属性,该属性用于指定要进行循环迭代的集合对象。对于List对象,默认使用"list"作为键,对于数组对象,默认使用"array"作为键。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [MyBatis中foreach的用法](https://blog.csdn.net/weixin_38192427/article/details/121443045)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [mybatis(foreach)使用 delete not in](https://blog.csdn.net/qq_16946803/article/details/109028554)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文