什么是重复数据删除表的最佳方法? [英] What's the best way to dedupe a table?
问题描述
我已经看到了几个解决方案,但我想知道最好最有效的方式是去掉桌面。您可以使用代码(SQL等)来说明您的观点,但我只是寻找基本的算法。我假设已经有一个关于这个的问题,但是我找不到一个问题,所以如果它已经存在只是给我一个头。
I've seen a couple of solutions for this, but I'm wondering what the best and most efficient way is to de-dupe a table. You can use code (SQL, etc.) to illustrate your point, but I'm just looking for basic algorithms. I assumed there would already be a question about this on SO, but I wasn't able to find one, so if it already exists just give me a heads up.
(仅仅是为了澄清 - 我指的是在具有增量自动PK的表中摆脱重复项,并且除了PK字段之外的所有东西都有重复的行)。
(Just to clarify - I'm referring to getting rid of duplicates in a table that has an incremental automatic PK and has some rows that are duplicates in everything but the PK field.)
推荐答案
删除重复记录
http://www.databasejournal.com/features/mssql/article.php/1438651/Removing- Duplicate-Records.htm
如何从SQL Server中的表中删除重复的行:
http://support.microsoft.com/kb/139444
删除重复的条目/行一个mySQL数据库表:
http://www.justin-cook.com/wp/2006/12/12/remove-duplicate-entries-rows-a-mysql-database-table/
从SQL Server中删除表中的重复项
http://www.simple- talk.com/sql/t-sql-programming/removing-duplicates-from-a-table-in-sql-server/
应该得到你要去,如果你需要更多的例子,请让我知道。
That should get you going, if you need more examples please let me know.
这篇关于什么是重复数据删除表的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!