查询及删除数据库重复记录的方法
方法1、通过rowid
select * from db.tbfp03 t1 where t1.rowid > (select min(t2.rowid) from db.tbfp03 t2 where t1.compid = t2.compid and t1.applyno = t2.applyno);方法2、通过in及分组函数
select t1.* from db.tbfp03 t1 where (t1.compid,t1.applyno) in(select t2.compid,t2.applyno from db.tbfp03 t2
group by t2.compid,t2.applyno having count(*) > 1)请高手解答一下这2种方法哪个效率高?有没有更好的解决方案