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

How to replace given values with null using nullif()?

988


what is a sub-report?

140


What do you mean by an execution plan? How would you view it?

914


Can two tables share the same primary key?

917


Which are the two editions in which SQL Azure database available?

119


How do you create a data source?

911


Explain about system database?

1063


How many types of relations are there between dimension and measure group? : sql server analysis services, ssas

1203


How to drop an existing stored procedure in ms sql server?

1032


The external application that is executed in one of the tasks does not have a log file, but only a screen log. How can I save the data from the screen? : sql server management studio

1015


How to download and install microsoft .net framework version 2.0?

1139


What are entities and relationships?

975


Can a database be shrunk with users active?

1133


Give main differences between "Truncate" and "Delete".

1099


What happens if null values are involved in comparison operations?

977