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 is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration

1123


What is difference between after and before?

1186


What is measure group, measure? : sql server analysis services, ssas

1067


What are subqueries in sql server?

1188


What do you mean by data integrity?

1124


Explain system rowset functions?

1042


Where views are stored in sql server?

1026


Explain what are the basic functions for master, msdb, model, tempdb databases?

1026


Where are stored procedures in sql server?

1122


What is default constraint in ms sql server?

1099


Can you explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?

1034


What are sp_configure commands and set commands?

1070


What programming language would you use to create embedded functions in ssrs?

191


How to get a list of all tables with "sys.tables" view in ms sql server?

1078


Explain about analysis services?

1103