select *
from (select a.*, b.METRICS_NAME, b.METRICS_CODE
from hl_metrics a,
metrics_def b
where a.METRICS_ID = b.METRICS_ID) t
insert into hl_metrics
HL_CLASS_ID,
METRICS_ID,
HL_SCORE,
HL_STAND,
CREATE_BY,
CREATE_TIME,
UPDATE_BY,
UPDATE_TIME,
REMARK,
#{hlClassId},
#{metricsId},
#{hlScore},
#{hlStand},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
update hl_metrics
HL_CLASS_ID =
#{hlClassId},
METRICS_ID =
#{metricsId},
HL_SCORE =
#{hlScore},
HL_STAND =
#{hlStand},
CREATE_BY =
#{createBy},
CREATE_TIME =
#{createTime},
UPDATE_BY =
#{updateBy},
UPDATE_TIME =
#{updateTime},
REMARK =
#{remark},
where HL_METRICS_ID = #{hlMetricsId}
delete
from hl_metrics
where HL_METRICS_ID = #{hlMetricsId}
delete from hl_metrics where HL_METRICS_ID in
#{hlMetricsId}