We can easily remove duplicate rows from a table in Oracle. There are a lot of ways with SQL.

We can use this easy 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 CUSTOMERS
WHERE ROWID NOT IN ( SELECT MIN (ROWID)
FROM CUSTOMERS
GROUP BY CUSTOMER_NUMBER,
NAME,
SURNAME,
PHONE_NUMBER,
E_MAIL,
COUNTRY,
CITY);

--

--