--1,删除前先查询核实
select b.idcard,b.name,count(b.idcard) num from table1 b group by b.idcard,b.name having count(b.idcard)>1
--1,删除前先查询核实数据量
select count(1) number from table1
--2,删除前请先备份全部数据,避免数据损失。
create table table1备份 as
select * form table1
--3,删除
delete table1 tt where rowid in
--select * from table1 tt where exists
(select max(rowid) from table1 b group by b.idcard,b.name having count(b.idcard)>1)
--4,在核查数据是否已经处理完毕,操作第一步,第二步核实。
--5,如果有问题请通过第三步的备份表核实数据。
转载于:https://my.oschina.net/u/2336787/blog/485354