INSERT 태그를 SELECT 태그로 변경하고 맨아랫줄 코드를 삽입
<select id="insertItemMainVote" resultType="Integer">
INSERT INTO db_event.dbo.tbl_survey_question(
question_contents, subjective_yn, answer_cnt
)VALUES(
#{question_contents}, 'N', 3
)
SELECT @@IDENTITY AS question_idx
</select>
반응형
'Sql > - Mssql' 카테고리의 다른 글
STRING_AGG (0) | 2023.01.27 |
---|