spring 스프링/MyBatis 마이바티스

방금 INSERT 된 Key 가져오기

KIMSG 2017. 7. 28. 11:20
1
2
3
4
<insert id="insertData" parameterType="DataClass" useGeneratedKeys="true"   keyProperty="id">
     /* query */
</insert>
 
cs



insert된 값을 id라는 키로 가져올 수 있다.



출처 : http://marobiana.tistory.com/23