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 the most common trace flags used with sql server?

1120


How to create “dependant” parameter “make, model, year”

137


Which table keeps the locking information?

987


How can I get data from a database on another server?

1051


What are the different types of indexes?

1161


To automatically record the time on which the data was modified in a table, which data type should you choose for the column?

1006


What are the general features of sql server management studio? : sql server management studio

1136


How to delete all rows with truncate table statement in ms sql server?

1047


Explain about integration services of Microsoft SQL server?

1092


What is database black box testing?

1073


You want to implement the many-to-many relationship while designing tables. How would you do it?

1050


query processing

2221


Do you know how to store and query spatial data?

1089


How to get a list of columns using the "sys.columns" view in ms sql server?

1010


I applied Transactional with updatable subscriptions replication on 2 tables now i want to delete those 2 tables but i cannot delete those tables as replication is running how can i stop replication for those 2 tables(but i don't want to delete those replicated tables but i need to stop the replication) how can i do that

2085