UPDATE tb_content
SET tms_id = #{tmsId}
WHERE content = #{content}
UPDATE tb_content
SET tms_id = NULL
WHERE content = #{content}
INSERT INTO tb_content (
content,
del_yn,
tms_id,
created_by,
updated_by,
created_time,
updated_time
)
SELECT
#{content},
#{locale},
#{tmsId},
#{createdBy},
#{updatedBy},
#{createdTime},
#{updatedTime}
WHERE NOT EXISTS (
SELECT *
FROM tb_content
WHERE content = #{content}
)