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...

if 3 duplicate records in a table,i want to delete 2 duplicate
records by keeping 1 duplicate and 1 original as it is,how?

Answer Posted / amol maske

DELETE FROM tablename WHERE ROWID NOT IN(
SELECT MIN(ROWID)FROM tablename GROUP BY columnname);

Is This Answer Correct ?    5 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the components of sql server service broker?

1011


What is the Difference Between Primary and Foreign Key?

1002


What is the recovery model? List the types of recovery model available in sql server?

900


What are the main sources of data?

1088


What are the essential components of sql server service broker?

1016


What is the security model used in sql server 2005?

998


What is plan freezing?

961


How to delete a database in ms sql server?

1222


Do you know what are the differences between lost updates and uncommitted dependencies?

1073


How to provide default values to function parameters?

1129


what is the maximum size of a row? : Sql server database administration

1005


Write the queries for commands like Create Table, Delete table, Drop Table etc.

1092


Which is the best place or learning center for MS SQL?????In Bangladesh?????

2067


What is key attribute?

929


Explain subquery and state its properties?

1037