方法一:
在Oracle中,你可以使用DELETE语句结合ROWID和子查询来删除重复的记录。以下是一个示例:
DELETE FROM your_table
WHERE ROWID NOT IN (
SELECT MAX(ROWID)
FROM your_table
GROUP BY column1, column2, ... -- 列出用于判断重复的列
);
原数据:

示例:
DELETE FROM SJS.CGGL_FWZX_USC_WS_SPYJ_SSFW
WHERE ROWID NOT IN (
SELECT MAX(ROWID)
FROM SJS.CGGL_FWZX_USC_WS_SPYJ_SSFW
GROUP BY ID -- 列出用于判断重复的列
);
COMMIT ;
结果:

方法二:
DELETE FROM your_table
WHERE id NOT IN (
SELECT MIN(id)
FROM your_table
GROUP BY A, B, C
);















![半平面求交 - 洛谷 - P3194 [HNOI2008] 水平可见直线](https://img-blog.csdnimg.cn/2020121310235323.png#pic_center)


