INSERT INTO survey( srvy_id,
srvy_type,
srvy_cnt)
VALUES (#{srvyId},
#{srvyType},
#{srvyCnt});
INSERT INTO survey_detail( srvy_dtl_id,
srvy_dtl_cnt,
srvy_id)
VALUES
(#{detail.srvyDtlId},
#{detail.srvyDtlCnt},
#{detail.srvyId})
UPDATE survey
SET srvy_type = #{srvyType},
srvy_cnt = #{srvyCnt}
WHERE
srvy_id = #{srvyId}
DELETE FROM survey
WHERE srvy_id = #{srvyId}
DELETE FROM survey_detail
WHERE srvy_id = #{srvyId}