发布网友 发布时间:2022-05-19 11:50
共1个回答
热心网友 时间:2023-10-11 13:10
mybatis在一个delete标签写多条delete语句
解决办法:直接写多条delete语句
[html] view plain copy
<delete id="deleteComboInfo">
delete from amb_pairs where id in
<foreach collection="id.split(',')" close=")" open="(" separator="," item="item">
#{item}
</foreach>
;
delete from amb_pair_detail where pair_id in
<foreach collection="id.split(',')" close=")" open="(" separator="," item="item">
#{item}
</foreach>
;
</delete>