Select * From 表 x
Where 重复字段 In (Select 重复字段 From 表 Group By 重复字段 Having Count(*)>1)
Order BY 重复字段
DELETE x FROM 表 x Where 重复字段 In (Select 重复字段 From 表 Group By 重复字段 Having Count(*)>1) AND Id NOT IN(Select Max(ID) From 表 xx WHERE xx.重复字段=x.重复字段 )
标签:Count,重复,Server,xx,SQL,重复记录,Select From: https://www.cnblogs.com/LuoCore/p/17733363.html