<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>
语句,不过要注意返回类型