'mybatis'에 해당하는 글 1건

selectKey

mybatis 2017. 8. 26. 11:46

insert 할때 키값 미리받아오기


<insert id="sampleInsert" parameterClass="sampleIdx">

<selectKey keyProperty="aa" resultType="" order="BEFORE">

SELECT COLUMN_NAME FROM DUAL

</selectKey>

INSERT INTO T_AA (aa, bb, cc)

VALUES (#{aa}, #{bb}, #{cc})

</insert>


빨간부분 잘 맟춰주기



WRITTEN BY
형때기
simple blog

,