如何在SQL Server中查找当前插入的记录 [英] How to find current Inserted record in sql server

查看:380
本文介绍了如何在SQL Server中查找当前插入的记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有tblCustomer表,其中包含1000条记录.
如果我要通过客户"字段区分记录,那么它将显示650条记录.

我必须从tblCustomer检索650条记录.
在这里,我必须找出最新记录,看看该记录是否具有按照监护人要求的重复记录.这里没有任何日期字段.


请给我解决方法.

Bye

Hi,

I have tblCustomer table that contains 1000 records.
If i will distinct the records through custid field then it is showing me 650 records.

I have to retrieve 650 records from tblCustomer.
Here i have to find out latest record if the record has the duplicate as per the custid. Here is no any date fields.


plz give me the solution.

Bye

推荐答案

您可以通过查询最大主键值来找到最后一条记录.您尝试了什么?
You can find the last record by querying for the max primary key value. What have you tried?


这篇关于如何在SQL Server中查找当前插入的记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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