select d.id, d.staff_id, d.company_id, s.item, s.course_code, d.start_date, d.end_date, d.score, d.operation_score, d.training_place, d.training_duration, d.training_cost, d.budget, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate from t_training_participants d
left join t_training_companylevel s on d.company_id = s.id
SELECT seq_t_training_participants.NEXTVAL as id FROM DUAL
insert into t_training_participants
id,
staff_id,
company_id,
start_date,
end_date,
score,
operation_score,
training_place,
training_duration,
training_cost,
budget,
remarks,
del_flag,
creater_code,
createdate,
updater_code,
updatedate,
#{id},
#{staffId},
#{companyId},
#{startDate},
#{endDate},
#{score},
#{operationScore},
#{trainingPlace},
#{trainingDuration},
#{trainingCost},
#{budget},
#{remarks},
#{delFlag},
#{createrCode},
#{createdate},
#{updaterCode},
#{updatedate},
update t_training_participants
staff_id = #{staffId},
company_id = #{companyId},
start_date = #{startDate},
end_date = #{endDate},
score = #{score},
operation_score = #{operationScore},
training_place = #{trainingPlace},
training_duration = #{trainingDuration},
training_cost = #{trainingCost},
budget = #{budget},
remarks = #{remarks},
del_flag = #{delFlag},
creater_code = #{createrCode},
createdate = #{createdate},
updater_code = #{updaterCode},
updatedate = #{updatedate},
where id = #{id}
update t_training_participants
staff_id = #{staffId},
company_id = #{companyId},
start_date = #{startDate},
end_date = #{endDate},
score = #{score},
operation_score = #{operationScore},
training_place = #{trainingPlace},
training_duration = #{trainingDuration},
training_cost = #{trainingCost},
budget = #{budget},
remarks = #{remarks},
del_flag = #{delFlag},
creater_code = #{createrCode},
createdate = #{createdate},
updater_code = #{updaterCode},
updatedate = #{updatedate},
where staff_id = #{staffId} and company_id = #{companyId}
update t_training_participants set del_flag = 2 where id = #{id}
update t_training_participants set del_flag = 2 where company_id = #{companyId} and staff_id = #{staffId} and del_flag = 0
update t_training_participants set del_flag = 2 where del_flag = 0
update t_training_participants set del_flag = 2 where id in
#{id}