We can easily remove duplicate rows from a table in Oracle.
There are a lot of ways with SQL.
I use the following method:
DELETE FROM table_name WHERE ROWID NOT IN ( SELECT MIN (ROWID) FROM table_name GROUP BY col1, col2, col3, col4...);
Let’s make an example of a scenario.
Sample Table (Before Delete):
DELETE FROM xx_employee WHERE ROWID NOT IN ( SELECT MIN (ROWID) FROM xx_employee GROUP BY employee_number, first_name, last_name, sex, job);
Sample Table (After Delete):