美文网首页
Mybatis 多条数据更新

Mybatis 多条数据更新

作者: 咖啡机an | 来源:发表于2018-09-26 15:43 被阅读0次
      update
       T_EQUI_VIDEO_RELA t
       set
       t.dev_coor = CASE
       <foreach collection="list" item="m" index="index">
           when t.rela_id = #{m.relaId} then #{m.coor}
       </foreach>
       END
       WHERE
       t.rela_id in
       <foreach collection="list" item="m" index="index" open="(" separator="," close=")">
           #{m.relaId}
       </foreach>

相关文章

网友评论

      本文标题:Mybatis 多条数据更新

      本文链接:https://www.haomeiwen.com/subject/agtjoftx.html