--查询重复数据-- SELECT XYH,COUNT(*) FROM BGJL GROUP BY XYH having(count(*)>1) --删掉重复数据-- DELETE from BGJL WHERE (XYH) IN ( SELECT XYH FROM BGJL GROUP BY XYH HAVING COUNT(XYH) > 1) AND ROWID NOT IN (SELECT MIN(ROWID) FROM BGJL GROUP BY XYH HAVING COUNT(*) > 1);