是否有可能获得最新插入的记录 [英] is it possible to get latest inserted record

查看:64
本文介绍了是否有可能获得最新插入的记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


是否有可能从sql server中的表中获取最新插入的记录,
该表没有标识列和创建日期列

请帮助我





谢谢与问候
Sudheer.N

HI all,


is it possible to get latest inserted record from the table in sql server,
that table dont have identity column and created date column

please help me





Thanks & Regards
Sudheer.N

推荐答案

您好,由于此处没有代码显示您的解决方案详细信息,因此,我将指导您进行类似的讨论:http://stackoverflow.com/questions/5228780/how-to-get-last-inserted-id [ ^ ].

祝你好运.
Hi, since there is no code presents your solution details here, So I will direct you to a similar discussion : http://stackoverflow.com/questions/5228780/how-to-get-last-inserted-id[^].

Good Luck.


从yourTableName中选择最大(您的记录)列名"
在您执行插入查询
"slect max(your record)coloumn name from yourTableName"
After ur insert query


后,在表中使用插入触发器,这将返回最后插入的记录.
use inserted trigger in table which will return the last inserted record.


这篇关于是否有可能获得最新插入的记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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