删除表A中的重复记录你可以直接用
delete from YOURTABLE t
where t.rowid!=(select max(a.rowid) from YOURTABLE  a
where a.字段名=t.字段名)

解决方案 »

  1.   

    delete from temp4_emails_checked
     where email  in (select  email  from temp4_emails_checked  group  by  email   having  count(email) > 1)
     and rowid not in (select min(rowid) from  temp4_emails_checked group by email  having count(email )>1)
      

  2.   

    to mayongzhi:那样是不是表中的每个字段名都要写出来?太麻烦了吧?
      

  3.   

    直接
    delete from temp a where rowid not in(select max(rowid) from temp b where a.重复主键=b.重复主键)
      

  4.   

    to tian00weiwei(weiwei):“重复主键”是重复值的字段名吗?但我觉得重复记录应当是每一列都有和他相同的记录才算是重复记录呀,比如我的字段有c1,c2,c3,...c9,
    delete from temp a where rowid not in(select max(rowid) from temp b where a.c1=b.c1)是不是只能删掉c1列有相同值的记录?