ibatis挿入による自己増加idの取得

576 ワード

<insert id="addadjunct" parameterClass="adjunct">
	insert into t_project_adjunct(fadjunct,ftype,fcreater,fcreatetime,fdeleted) 
	values(#name#,1,#creater#,sysdate(),0)
	<selectKey keyProperty="id" resultClass="int">
	  SELECT @@IDENTITY AS ID
   </selectKey>
</insert>
は主に
<selectKey keyProperty="id" resultClass="int">
	  SELECT @@IDENTITY AS ID
   </selectKey>
文ですが、戻りタイプに注意してください.