如何从表中获取当前的主键值(标识值)? [英] How to get current primary key value(Identity value) from the table?

查看:83
本文介绍了如何从表中获取当前的主键值(标识值)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请给出您的宝贵建议和答案,并感谢您的答复.

Please give your valuable suggestions&answers and thanks for responses.

推荐答案

从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[^]


这篇关于如何从表中获取当前的主键值(标识值)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆