如何从表中获取当前的主键值(标识值)? [英] How to get current primary key value(Identity value) from the table?
本文介绍了如何从表中获取当前的主键值(标识值)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请给出您的宝贵建议和答案,并感谢您的答复.
Please give your valuable suggestions&answers and thanks for responses.
推荐答案
从MSDN中请参见以下主题:
- SCOPE_IDENTITY [ IDENT_CURRENT [ @@ IDENTITY [ ^ ]
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[^]
这篇关于如何从表中获取当前的主键值(标识值)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文