英文描述:how ibatis return the auto increment primary key when insert.
详细解决办法在这里,我验证过,是可用的:
http://snowolf.iteye.com/blog/215571
但是看了解决办法后,我不明白@@IDENTITY 以及 SCOPE_IDENTITY()是什么意思。
所以又搜索了一下:
http://stackoverflow.com/questions/481395/t-sql-identity-scope-identity-output-and-other-methods-of-retrieving-last
http://stackoverflow.com/questions/10294122/select-last-insert-id
http://stackoverflow.com/questions/1920558/what-is-the-difference-between-scope-identity-identity-identity-and-ide
本文深入解析了SQL Server中用于获取自增主键的@@IDENTITY和SCOPE_IDENTITY()函数,通过链接提供详细解决办法,并解释了这两个函数在不同场景下的使用方式。
1128

被折叠的 条评论
为什么被折叠?



