Mybatisd对MySQL批量插入、批量更新及批量删除语句
文章目录
1、批量插入
`<insert
id="insertBatch"
parameterType="java.util.List">
insert into
t_student(name, age, class)
values
<foreach
collection="list"
item="item"
index="index"
separator=",">
(
#{item.name,jdbcType=VARCHAR},
#{item.age,jdbcType=INTEGER},
#{item.class,jdbcType=LONGVARCHAR}
)
</foreach>
`
2、批量更新
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论