select * from hlinsuredinfo a where (GrpContNo, insuredname, doctype, docNo) in (select GrpContNo, insuredname, doctype, docNo from (select GrpContNo, insuredname, doctype, docNo, count(*) co from hlinsuredinfo group by GrpContNo, insuredname, doctype, docNo) where co > 1) and rowid not in (select min(rowid) from hlinsuredinfo group by GrpContNo, insuredname, doctype, docNo having count(*) > 1)
上述sql语句用于查询重复数据,若需要删除,将select * from 改为delete from 即可