select d.id, d.assessor, d.points_left, d.ass_year, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id ,s.dept_name from t_shift_annual_ass_points d left join sys_dept s on s.dept_id = d.dept_id SELECT SEQ_T_SHIFT_ANNUAL_ASS_POINTS.NEXTVAL as id FROM DUAL insert into t_shift_annual_ass_points id, assessor, points_left, ass_year, del_flag, creater_code, createdate, updater_code, updatedate, dept_id, #{id}, #{assessor}, #{pointsLeft}, #{assYear}, #{delFlag}, #{createrCode}, #{createdate}, #{updaterCode}, #{updatedate}, #{deptId}, update t_shift_annual_ass_points assessor = #{assessor}, points_left = #{pointsLeft}, ass_year = #{assYear}, del_flag = #{delFlag}, creater_code = #{createrCode}, createdate = #{createdate}, updater_code = #{updaterCode}, updatedate = #{updatedate}, dept_id = #{deptId}, where id = #{id} update t_shift_annual_ass_points set del_flag = 2 where id = #{id} update t_shift_annual_ass_points set del_flag = 2 where id in #{id}