Java MyBatis3(10)批量插入数据(MySql)

序言

插入成功后返回自增主键

<insert id="insertRole" parameterType="role" useGeneratedKeys="true" keyProperty="id">
   insert into t_role(role_name,note) values (#{roleName},#{note})
</insert>

资料

https://www.cnblogs.com/admol/articles/4248159.html

https://www.cnblogs.com/java-zhao/p/5594795.html

posted @ 2019-01-26 14:16  ~沐风  阅读(732)  评论(0编辑  收藏  举报