如何从没有主键的表中检测/删除数据库中的重复条目?
[如果我们使用“ DISTINCT”,我们如何知道哪一条记录是正确的并重复一条记录?]
delete f from ( select ROW_NUMBER() over (partition by YourFirstPossibleDuplicateField, YourSecondPossibleDuplicateField order by WhateverFieldYouWantSortedBy) as DelId from YourTable ) as f where DelId > 1