mybatis实现oracle批量插入,带序列(记录一下)


		INSERT INTO CHECK_DETAIL(
			CHECK_id,CHECK_DATE,CHECK_WEEK,EMP_CODE,CHECK_TIME,CHECK_LATE,CHECK_LEAVE_EARLY,
		    CHECK_EXCEPTION,CHECK_WORK_OVERTIME,EMP_NAME,DEPT_NAME,CHECK_LATE_TIME,DESCRIPTION
		  )
		  select CHECK_DETAIL_SEQ.NEXTVAL,cd.* from(
		  
			  select
			    #{item.checkDate,jdbcType=VARCHAR},
			    #{item.checkWeek,jdbcType=VARCHAR},
			    #{item.empCode,jdbcType=VARCHAR},
			    #{item.checkTime,jdbcType=VARCHAR},
			    #{item.checkLate,jdbcType=VARCHAR},
			    #{item.checkLeaveEarly,jdbcType=VARCHAR},
			    #{item.checkException,jdbcType=VARCHAR},
			    #{item.checkWorkOverTime,jdbcType=VARCHAR},
			    #{item.empName,jdbcType=VARCHAR},
			    #{item.deptName,jdbcType=VARCHAR},
			    #{item.checkLateTime,jdbcType=VARCHAR},
			    #{item.description,jdbcType=VARCHAR}
			    from dual
		    
		    ) cd
	


你可能感兴趣的:(mybatis实现oracle批量插入,带序列(记录一下))