select u.id, u.url, u.name, u.remarks, u.status, u.del_flag, u.creater_code, u.createdate, u.updater_code, u.updatedate, u.dept_id from t_file u left join sys_dept d on u.dept_id = d.dept_id SELECT seq_t_file.NEXTVAL as id FROM DUAL insert into t_file id, url, name, remarks, status, del_flag, creater_code, createdate, updater_code, updatedate, dept_id, table_id, table_name, #{id}, #{url}, #{name}, #{remarks}, #{status}, #{delFlag}, #{createrCode}, #{createdate}, #{updaterCode}, #{updatedate}, #{deptId}, #{tableId}, #{tableName}, update t_file url = #{url}, name = #{name}, remarks = #{remarks}, status = #{status}, del_flag = #{delFlag}, creater_code = #{createrCode}, createdate = #{createdate}, updater_code = #{updaterCode}, updatedate = #{updatedate}, dept_id = #{deptId}, table_id=#{tableId}, table_name=#{tableName}, where id = #{id} update t_file set del_flag = 2 where id = #{id} update t_file set del_flag = 2 where id in #{id}