INSERT INTO tb_answers ( answer_id, response_id, question_id, answer_text, selected_option_id ) VALUES ( #{answerId, jdbcType=OTHER}, #{responseId, jdbcType=OTHER}, #{questionId, jdbcType=OTHER}, #{answerText}, #{selectedOptionId, jdbcType=OTHER} ) UPDATE tb_answers SET answer_text = #{answerText}, selected_option_id = #{selectedOptionId, jdbcType=OTHER} WHERE answer_id = #{answerId, jdbcType=OTHER} DELETE FROM tb_answers WHERE answer_id = #{answerId, jdbcType=OTHER}