delete from 表名 where rowid not in (select min(rowid) from 表名 group by name having count(name)>=1)
代码摘自百度。