delete from tbname where rowid in(select max(rowid)
from tbname where ... having count(*)>1);

解决方案 »

  1.   

    现在不是重了一条是重了好多条,用上面的SQL只能删除一条记录.
      

  2.   

    delete from table where rowid = (select min(rowid) from table where id=...)
      

  3.   

    是一个id 有多条记录?还是有很多的id都有重复的记录?
      

  4.   

    delete from table_name a where a.rowid > (select min(b.rowid) from table_name b where a.字段=b.字段)
      

  5.   

    delete from a a where a.rowid!=(select max(rowid) from a b where a.bm=b.bm and a.mc=b.mc);
      

  6.   

    测试过,该语句可以:
    delete from tablename a1 where a1.rowid!=(select max(rowid) from tablename a2 where a1.id=a2.id )