删除sql server中重复的数据

原文:删除sql server中重复的数据

with list_numbers as
(
  select Name, AuthorOrTime, Url, Price, EstimatePrice, Size, Category,
  ROW_NUMBER() over (order by Name, AuthorOrTime, Url, Price, EstimatePrice, Size, Category) as 'rownumber'
  from Arts
)
delete list_numbers where rownumber not in
(
  select min(rownumber) from list_numbers group by Name, AuthorOrTime, Url, Price, EstimatePrice, Size, Category
)

 

 

上一篇:PHP版本Non Thread Safe和Thread Safe如何选择?区别是什么?


下一篇:谷歌将停止支持 Chrome OS 以外平台 Chrome 应用