如何刪除重複的行? - How can I remove duplicate rows?

問題:

What is the best way to remove duplicate rows from a fairly large SQL Server table (ie 300,000+ rows)? 從至關大的SQL Server表(即300,000+行)中刪除重複行的最佳方法是什麼? ide

The rows, of course, will not be perfect duplicates because of the existence of the RowID identity field. 固然,因爲存在RowID標識字段,所以這些行將不是完美的重複項。 spa

MyTable MyTable .net

RowID int not null identity(1,1) primary key,
Col1 varchar(20) not null,
Col2 varchar(2048) not null,
Col3 tinyint not null

解決方案:

參考一: https://stackoom.com/question/4vM/如何刪除重複的行
參考二: https://oldbug.net/q/4vM/How-can-I-remove-duplicate-rows
相關文章
相關標籤/搜索