TECH SOLUTIONS

Click here to edit subtitle

Forums

Post Reply
Forum Home > Database Learnings > Oracle: Sql query to delete duplicate rows from a table

Sourav Gulati
Site Owner
Posts: 83

For example we have a table "emp" . Duplicate entries of rows can be deleted  from this table as follows:

delete from emp where rowid not in ( select max(rowid) from emp group by empno)

Now there wont be  duplicate entry for any row in emp :)

--


January 17, 2013 at 4:03 AM Flag Quote & Reply

You must login to post.