mybatis中寫法:
序列一定要放在外面,不然會報 此處不允許序號
<insert id="addInvestorFileupload" parameterType="java.util.List"> insert into investor_file_info (id, userid, url, type, uploaddate, path, approve_id ) select SEQ_INVESTOR_FILE_INFO.NEXTVAL , A.* from( <foreach collection="list" index="index" item="item" separator=" union " > select #{item.userId}, #{item.investorUrl}, #{item.investorType}, sysdate, #{item.investorPath}, #{item.investorApproveId} from dual </foreach> )A </insert>
