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 / kk

DELETE
FROM MyTable
WHERE ID NOT IN
(
SELECT MAX(ID)
FROM MyTable
GROUP BY DuplicateColumn1, DuplicateColumn2, DuplicateColumn3)

Is This Answer Correct ?    7 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to automatically create a log when an exception is being received into SQL Server?

1290


Explain encryption of entire databases without the need for application changes in sql server 2008?

1046


How to use subqueries with the in operators in ms sql server?

1075


What are page splits?

996


How to convert a unicode strings to non-unicode strings?

1102


How to create stored procedures with parameters in ms sql server?

1079


Issues related in upgrading SQL Server 2000 to 2005 / 2008

1889


what is checksum in sql server.........???

1687


Explain table valued parameters in sql server? Why tvp used?

1020


Why we need to use secondry database file? though, we can do same work using primary database file also.

6890


What is reportserver and reportservertempdb ?

152


Where does the copy job runs in the log shipping primary or secondary? : sql server database administration

1044


How do I view a script in sql server?

1046


How to find index size for each index on table?

1003


what are the Prerequisites for Replication?

11353