查询选择sql server 2008 R2中最后插入的id? [英] Query to select the last inserted id in sql server 2008 R2?

查看:81
本文介绍了查询选择sql server 2008 R2中最后插入的id?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试选择我最后插入的不是自动递增的ID或主键。

我只想选择最后一个ID。

可以有人建议我任何人回答。

提前使用Thanx

I am trying to select my last inserted id which is not auto incremented or primary key.
I just want to select last id.
Could anybody suggest me any answer.
Thanx in advance

推荐答案

你可以参考这个



http://ask.sqlservercentral.com/问题/ 30905 /获取最近插入的价值在非id.html [ ^ ]
You can refer this

http://ask.sqlservercentral.com/questions/30905/obtaining-the-recently-inserted-value-in-an-non-id.html[^]


Hi Ali,



为什么你没有尝试谷歌这个?

我问谷歌,它确实回答了我。

您可以在此处 [ ^ ]。



希望这会对你有所帮助。



问候,

RK
Hi Ali,

Why you have'nt tried google for this?
I asked google, it did answered me.
You can see the answer here[^].

Hope this helps you a bit.

Regards,
RK


这篇关于查询选择sql server 2008 R2中最后插入的id?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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