how to delete all duplicate records from a table using
subquery?
Answer Posted / aseem k
Tried and tested:
Table d:
7
8
7
DELETE FROM D WHERE ROWID IN (
SELECT DISTINCT MIN(ROWID) FROM D
WHERE DEPTNO IN
(SELECT DEPTNO FROM D GROUP BY DEPTNO
HAVING COUNT(DEPTNO)>1))
Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
15. Display the item_cost and then truncate it to the nearest hundred, ten, unit, tenth and hundredth.
What are the extensions used by oracle reports?
What is object data modeling?
What are the restrictions on external table columns?
What is oracle server autotrace in oracle?
Explain the use of tables option in exp command.
How to change system global area (sga) in oracle?
How do I limit the number of rows returned by an oracle query after ordering?
What are joins, explain all types of joins?
What is using clause and give example?
How can Oracle users be audited?
How to run queries on external tables?
In what script is snap$ created? In what script is the scott/tiger schema created?
What is a private synonym?
How can you use check constraints for self referential integrity?