天天看點

Gbase 8s 批量新增 mybatis

<!-- 批量插入使用者, foreach 循環操作, 同樣不能使用text/byte/clob/blob字段 -->
    <insert id="foreachaddStudent" useGeneratedKeys="true">
        <foreach collection="list" item="item">
            insert into student(username,usertext,userphoto) values
            (#{item.userName},#{item.userText},#{item.userPhoto});
        </foreach>
    </insert>