Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

How do I connect to oracle?

1036


what is the scripts in data base?

2160


What are triggers in oracle?

1044


How does the on-delete-cascade statement work?

1123


How to create a stored program unit?

1235


You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance?

2018


In which language oracle has been developed?

1081


Explain the use of record length option in exp command.

1071


What is raw datatype?

1146


Can we insert data in view oracle?

1046


How to use "for" statements in oracle?

1080


Can we convert a date to char in oracle and if so, what would be the syntax?

1021


Explain the use of indexes option in exp command.

1156


How to select some rows from a table in oracle?

1083


A table t is there.If you perform insert ,update and delete then the trigger will fire.What is the minimum no of trigger required for a table.

5572