日期:2014-05-16 浏览次数:20704 次
<insert id="addUserData" parameterType="java.util.List"> INSERT INTO T_P_USER_DATA (USER_ID, DEPART_ID) <foreach collection="list" item="item" index="index" separator=" UNION ALL "> SELECT #{item.userId}, #{item.departId} FROM DUAL </foreach> </insert>
<insert id="addUserData" parameterType="java.util.List"> INSERT INTO T_P_USER_DATA (USER_ID, DEPART_ID) VALUES <foreach collection="list" item="item" index="index" separator=","> ( #{item.userId}, #{item.departId}) </foreach> </insert>