Page 1 of 1

How to Delete Duplicate Records ?

Posted: Mon Apr 19, 2021 6:57 am
by infycle
We have a table called "Employees" , Delete the duplicate records from Column "First_Name" .

Delete Duplicate Records

Posted: Tue Apr 20, 2021 2:08 pm
by Manickaraja
Delete from table_name
Where rowid not in
(select min(rowid)
from table_name
group by column_name);

Re: How to Delete Duplicate Records ?

Posted: Fri Apr 23, 2021 7:33 am
by Rajesh Jeganathan
DELETE FROM Employees
WHERE rowid not in (SELECT MAX(rowid) FROM Employees GROUP BY First_name);

Re: How to Delete Duplicate Records ?

Posted: Mon Apr 26, 2021 10:05 am
by RAJA R
DELETE FROM table_name
WHERE employee_id NOT IN
(
SELECT MIN(employee_id) FROM table_name
GROUP BY first_name
);