INSERT INTO
ai_lms.user_unit (unit_id,
std_id,
user_id,
scls_id,
cmptn_yn,
cmptn_tm)
VALUES (#{unitId},
#{stdId},
#{userId},
#{sclsId},
#{cmptnYn},
TO_TIMESTAMP(#{cmptnTm}, 'YYYY-MM-DD HH24:MI:SS.US'))
UPDATE ai_lms.user_unit
SET cmptn_yn = #{cmptnYn},
cmptn_tm = TO_TIMESTAMP(#{cmptnTm}, 'YYYY-MM-DD HH24:MI:SS.US')
WHERE unit_id = #{unitId}
AND std_id = #{stdId}
AND user_id = #{userId}
AND scls_id = #{sclsId}
DELETE FROM ai_lms.user_unit
WHERE unit_id = #{unitId}
AND std_id = #{stdId}
AND user_id = #{userId}
AND scls_id = #{sclsId}