数据库删除数据表重复数据,只留下ID较小的行

delete   fromwhere   [重复字段]     in   (select     [重复字段]     fromgroup     by     字段     having     count([字段])   >   1)
and   ID  not  in  (select   min(ID)   from     []     group   by   [字段]     having   count([字段])> 1)

 

posted @ 2020-03-31 15:50  依楼听雨眠  阅读(174)  评论(0)    收藏  举报