日期:2014-05-16  浏览次数:20402 次

获取返回插入这条数据的主键
<insert id="insertProduct-MS-SQL" parameterClass="product">  
    insert into PRODUCT (PRD_DESCRIPTION)  
    values (#description#)  
    <selectKey resultClass="int" type="post" keyProperty="id" >  
        select @@IDENTITY as value  
    </selectKey>  
</insert>