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


Please Help Members By Posting Answers For Below Questions

Explain parameter file in oracle.

667


What do database buffers contain?

651


How to drop an existing table in oracle?

676


How to sort the query output in oracle?

708


How to run the anonymous block again?

691






What is bulk load in oracle?

685


I am using an Oracle 8i Database my data contains Clob data. I am using toad version 7.6 i am able to get the data in toad but unable to extract the data in excel.when trying to extract the data into the excel the toad error says out of memory. Can any body please help me to extract the data through the same toad version. Thanks in advance

1938


How does one get the view definition of fixed views/tables?

686


What is recovery manager(rman) backup in Oracle?

728


What are dml statements in oracle?

701


What are the different types of partitions in oracle?

582


you are a universe designer and report developer in BO, what type of information you gather from client?Briefly explain plz

1643


What is a read write transaction in oracle?

701


Explain about the analyze command in oracle?

674


How to use "while" statements in oracle?

813