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
How to insert multiple rows with one insert statement in oracle?
what is Single Byte Overhead...?
How to create an oracle database manually?
Describe the types of sub query?
How to get maxsal , minsal, ename department wise in single query
Why does Oracle not permit the use of PCTUSED with indexes?
How to drop an index in oracle?
What is key preserved table?
What is recovery manager in Oracle?
interview questions with answer for cts
What is dynamic proxy?
What is a procedure in oracle?
How to unlock the sample user account in oracle?
How to connect asp pages to oracle servers?
You have found corruption in a tablespace that contains static tables that are part of a database that is in NOARCHIVE log mode. How would you restore the tablespace without losing new data in the other tablespaces?