且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从表中获取当前的主键值(标识值)?

更新时间:2023-01-11 23:37:11

从MSDN中请参见以下主题:
From MSDN see the following topics:

  • SCOPE_IDENTITY[^]
  • IDENT_CURRENT[^]
  • @@IDENTITY[^]


请阅读以下内容: ^ ]和以下一个:http://sqlservercodebook.blogspot.hu/2008/03/to-get-current-identity -value-from.html [ ^ ]
Read this one: http://databases.aspfaq.com/general/how-do-i-get-the-identity/autonumber-value-for-the-row-i-inserted.html[^] and this one: http://sqlservercodebook.blogspot.hu/2008/03/to-get-current-identity-value-from.html[^]