mybatis批量更新语法

<foreach collection="packages" item="p" separator=";">
        update package
        set
            package_name = #{p.packageName},
            package_content = #{p.packageContent}
        where id =
            #{p.id}

</foreach>

 

posted @ 2020-08-03 13:51  执笔coding  阅读(240)  评论(0编辑  收藏  举报