Write a Query to Delete The Repeated Rows from emp table?

Oracle Apps Interview QuestionsCategory: SQLWrite a Query to Delete The Repeated Rows from emp table?
Questions Master asked 10 years ago

Write a Query to Delete The Repeated Rows from emp table;

1 Answers
Shailender Thallam Staff answered 10 years ago

DELETE FROM emp WHERE rowid NOT IN
  (SELECT MIN(rowid) FROM emp GROUP BY ename
  );