幽~灵!

导航

mybatis插入多行数据

<insert id="insertAuthor" useGeneratedKeys="true"
    keyProperty="id">
  insert into Author (username, password, email, bio) values
  <foreach item="item" collection="list" separator=",">
    (#{item.username}, #{item.password}, #{item.email}, #{item.bio})
  </foreach>
</insert>

posted on 2019-10-18 16:39  幽~灵!  阅读(697)  评论(0编辑  收藏  举报