1、创建临时表来存储有duplicate rows的记录
Create table dupeddata as(
Sel * from table group by
having count(*) > 1
) with data;
2、删除原表中的duplicate rows的记录
Delete from table
Where
in
( sel * from dupeddata );
3、把临时表中的记录插入到原表中。
Insert into table
Sel * from dupeddata;
4、删除临时表
Drop table dupeddata;
阅读(713) | 评论(0) | 转发(0) |