<selectKey resultClass="int" keyProperty="id">
select @@identity as id
</selectKey>
在插入後,可能要得到插入對象的ID,在insert里加入上面這代碼就OK了。
<selectKey resultClass="int" keyProperty="id">
select @@identity as id
</selectKey>
在插入後,可能要得到插入對象的ID,在insert里加入上面這代碼就OK了。