数据库
首页 > 数据库> > xml中SQL批量更新的写法

xml中SQL批量更新的写法

作者:互联网


<update id="batchUpdateReqDetail" parameterType="list">
<foreach collection="list" item="item">
update PROJECT_PLAN_REQ_DETAIL set
PLAN_PURCHASE_ID = #{item.planPurchaseId},
PLAN_STATUS = #{item.planStatus}
where 1=1 and PLAN_DETAIL_ID = #{item.planDetailId};
</foreach>
</update>

标签:xml,PURCHASE,DETAIL,item,PLAN,SQL,写法,ID
来源: https://www.cnblogs.com/gslgb/p/13747366.html