기본적으로 insert할 때 return 값은 

성공시 null을

실패시 exception을 발생한다.


그리하여 insert할때 값을 얻어오고 싶으면 아래와 같이 추가하면된다.


insert into values (어쩌고 ) 


<selectKey resultClass="int">

SELECT LAST_INSERT_ID();

</selectKey>


위와 같이 하면 인서트 된 마지막 값을 반환한다.

+ Recent posts