I am searching for a way to delete the duplicate records in a table..
Is anybody having efficient way to do it..?
The command is:
DELETE
FROM
(SELECT MIN(rowid)
FROM
WHERE a.dv = b.dv);
i.e. if the table name is emp and the dupicate column value is ename:
DELETE ename
FROM emp a
WHERE rowid <
(SELECT MIN(rowid)
FROM emp b
WHERE a.ename = b.ename)
Another solution is:
delete from
select max(rowid) from
1 comments:
Nice blog Thanks for sharing this Informative.
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Oracle Fusion Financials Online Training
Big Data and Hadoop Training In Hyderabad
Post a Comment