select distinct a,b,c from table

解决方案 »

  1.   

    不显示相同记录,例如只要A,B,C字段相同就显示第一条记录
    select distinct a,b,c from table_name
      

  2.   

    delete from table_name where rowid not in
    (select rowid from (select distinct a,b,c from table_name))
      

  3.   

    DELETE FROM TABLE_NAME
    WHERE ROWID!=(SELECT MAX(ROWID) FROM TABLE_NAME D
    WHERE TABLE_NAME.COL1=D.COL1 AND TABLE_NAME.COL2=D.COL2); 
      

  4.   

    delete from t t where t.rowid != (select max(rowid) from t tt where t.c1=tt.c1 and t.c2=tt.c2);
      

  5.   

    jiezhi(浪子) 的语句比较简单明了
      

  6.   

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