您的位置:首页 > 运维架构

@@IDENTITY, SCOPE_IDENTITY, and IDENT_CURRENT

2015-03-02 14:44 357 查看
@@IDENTITY, SCOPE_IDENTITY 和 IDENT_CURRENT都返回表的IDENTITY列的最后一个插入的值。

@@IDENTITY and SCOPE_IDENTITY return the last identity value generated in any table in the current session. However, SCOPE_IDENTITY returns the value only within the current scope; @@IDENTITY is not limited to a specific scope.

IDENT_CURRENT is not limited by scope and session; it is limited to a specified table.
https://msdn.microsoft.com/en-us/library/ms187342.aspx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: