以学生表student为例要去掉重名的人。
用rowid方法
查询有重复的记录:
select name from student group by name having count(name) > 1;
删除重复的记录,只留有rowid最小的记录
delete from student
where name in (select name from student group by name
having count(name) > 1)
and rowid not in (select min(rowid) from student group by name having count(name )>1);
还有其他方法,我这抛砖引玉了~~~