如何识别重复记录并将其删除。 [英] How to identify duplicate records and delete it .

查看:102
本文介绍了如何识别重复记录并将其删除。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以告诉我在表格中识别重复项的语法以及如何删除它们。

Can any tell me the syntax for identifying Duplicates within a table and how to delete those.

推荐答案

参见here [ ^ ]


最简单的方法是:

The simplest way is:
SELECT FieldName, COUNT(FieldName) AS Counter
FROM TableName
GROUP BY FieldName
HAVING COUNT(FieldName)>1





详情请见:查找和/或删除重复行 [ ^ ]


http://stackoverflow.com/questions/18932/how-can-i-remove-duplicate-rows [ ^ ]

从SQL Server中的表中删除重复行 [ ^ ]

希望这可以帮助你
http://stackoverflow.com/questions/18932/how-can-i-remove-duplicate-rows[^]
Remove Duplicate Rows from a Table in SQL Server[^]
Hope this helps you


这篇关于如何识别重复记录并将其删除。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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