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 retrieve duplicate rows in a table?
How to delete the duplicate entries in a table?

Answer Posted / anoop rajan

Tbale emp had some duplicate entries and i wanted to retain
the first of all duplicates, the others could be deleted as
follows . Please give your comments if this is the most
optimum way :

delete from emp where rowid in
(select rowid from emp o where rowid !=
(select min(rowid) from emp i where i.empno=o.empno));

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ems sql management studio? : sql server management studio

1092


What is sql service broker?

972


how can you attach more than 20 ldf files in sql server

1990


What is molap and its advantage? : sql server analysis services, ssas

977


How to drop an existing table with "drop table" statements in ms sql server?

1076


Scalability, Availability, Integration with internet, etc.)?

2872


What is NOT NULL Constraint in sql server 2012?

981


What is the difference between cartesian product and cross join?

857


What is the significance of master, tempdb and model databases?

1068


How to verify the port number of the sql server?

1132


What is sql azure database?

206


Explain the dirty pages?

993


What is a partition key?

942


What is partition in sql server?

1025


Explain what is the main purpose of having conversation group?

925