How to Delete Duplicate Records ?

Oracle Discussion
Post Reply
infycle
Site Admin
Posts: 2
Joined: Mon Apr 19, 2021 6:40 am

How to Delete Duplicate Records ?

Post by infycle »

We have a table called "Employees" , Delete the duplicate records from Column "First_Name" .
Manickaraja
Posts: 1
Joined: Tue Apr 20, 2021 1:56 pm

Delete Duplicate Records

Post by Manickaraja »

Delete from table_name
Where rowid not in
(select min(rowid)
from table_name
group by column_name);
Last edited by Manickaraja on Tue Apr 20, 2021 2:10 pm, edited 1 time in total.
Rajesh Jeganathan
Posts: 1
Joined: Fri Apr 23, 2021 7:07 am

Re: How to Delete Duplicate Records ?

Post by Rajesh Jeganathan »

DELETE FROM Employees
WHERE rowid not in (SELECT MAX(rowid) FROM Employees GROUP BY First_name);
Last edited by Rajesh Jeganathan on Fri Apr 23, 2021 7:43 am, edited 3 times in total.
RAJA R
Posts: 1
Joined: Fri Apr 23, 2021 7:09 am

Re: How to Delete Duplicate Records ?

Post by RAJA R »

DELETE FROM table_name
WHERE employee_id NOT IN
(
SELECT MIN(employee_id) FROM table_name
GROUP BY first_name
);
Post Reply