delete from emply a 
 where a.rowid > ( select min(b.rowid) from emply b where a.id = b.id )

解决方案 »

  1.   

    delete from emply t where exists (select * from emply where id=t.id and name=t.name and sex=t.sex and rowid>t.rowid) where id='001' and name='张三'' and sex='男'
      

  2.   

    delete from 
        emply a 
    where 
        a.rowid <> (select min(rowid) from emply where id = a.id and name = a.name and sex = a.sex)
      

  3.   

    delete from emply a 
     where a.rowid not in ( select min(b.rowid) from emply b where a.id = b.id )
      

  4.   

    同  libin_ftsafe(子陌红尘)
      

  5.   

    delete from emply
    where id not in 
    (select max(id)
    from Sun_Test
    group by name)
      

  6.   

    上面第四行的表名是我测试的表名,你改为emply就可以了
      

  7.   

    支持 syilo(龙飞) ding
      

  8.   

    以下的语句应该能实现你的目的:delete from emply a where a.rowid!=(select max(rowid) from emply b where a.id=b.id)
      

  9.   

    select distinct * from emply;就可以拉!
      

  10.   

    delete from emply a where a.rowid!=(select max(rowid) from emply b where a.id=b.id)