sql建立唯一的非聚集索引时由于数据重复建立失败,快速删除重复数据的 巧妙 sql----2

 

 

 

 delete From  weibo 
  where url in 
  (
  select  url from weibo
  group by url
  having count(*)>1
  )
and id not in (
  select  min(id) from weibo
  group by url
  having count(*)>1
  )

 

posted on 2018-01-02 14:01  奔游浪子  阅读(90)  评论(0)    收藏  举报

导航