删除重复数据,保留一条
--P_CODE 重复列 DELETE FROM Tab WHERE P_CODE IN (SELECT P_CODE FROM Tab GROUP BY P_CODE HAVING COUNT(P_CODE) > 1) AND ROWID NOT IN (SELECT MIN(ROWID) FROM Tab GROUP BY P_CODE HAVING COUNT(*) > 1);
--P_CODE 重复列 DELETE FROM Tab WHERE P_CODE IN (SELECT P_CODE FROM Tab GROUP BY P_CODE HAVING COUNT(P_CODE) > 1) AND ROWID NOT IN (SELECT MIN(ROWID) FROM Tab GROUP BY P_CODE HAVING COUNT(*) > 1);