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

Delete duplicate records from the table?(Table must have
unique id)

Answer Posted / lince

DELETE
FROM MyTable
WHERE ID IN
(
SELECT MAX(ID)
FROM MyTable
GROUP BY DuplicateColumn1 HAVING COUNT(ID)>1
)

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain transaction server consistency?

1019


What is the maximum size of sql server database?

1063


Explain partitioned view?

1132


what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration

1113


What is the command used to check locks in microsoft sql server?

1097


can we have a nested transaction? : Sql server database administration

1193


What are the main differences between #temp tables and @table variables and which one is preferred?

1134


How can you know if the row fetched from cursor is still valid in underlying table?

1046


What is the purpose of data source?

1091


Is ssrs support other database except ms sql server?

142


What is data file in computer?

1001


Define candidate key, alternate key, and composite key.

968


What is change data capture (cdc) feature?

1122


How to enter date and time literals in ms sql server?

1066


What is self contained scalar sub query?

1016