Mybatisd对MySQL批量插入、批量更新及批量删除语句

一、批量插入java

<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> </insert>

二、批量更新spa

相关文章
相关标签/搜索