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

DELETE FROM MyTable
LEFT OUTER JOIN (
SELECT MIN(RowId) as RowId, Col1, Col2, Col3
FROM MyTable
GROUP BY Col1, Col2, Col3
) as KeepRows ON
MyTable.RowId = KeepRows.RowId
WHERE
KeepRows.RowId IS NULL

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is collation sensitivity?

1065


What is snapshot parameter in ssrs?

150


What is change tracking in sql server?

1025


Where sql server user names and passwords are stored in sql server? : sql server database administration

1056


How to use old values to define new values in update statements in ms sql server?

1268


How do I create a partition table in sql server?

1124


Explain how you can configure a running aggregate in SSRS?

163


last function used in MS Access to convert sql what function will use in sql

2071


Does sql server 2016 have ssms?

961


What is the difference between cube operator and rollup operator? : SQL Server Architecture

1123


What is optimistic concurrency?

1038


What will be the maximum number of indexes per table?

962


What is de-normalization and what are some of the examples of it?

976


Determine when an index is appropriate?

1077


What is the use of partition by in sql server?

933