How to delete duplicate records in MSSQL Server?

 Here I have assumed that table name is Cars and Carid is primary key.


DELETE FROM CARS WHERE carId NOT IN (select MAX(carId)AS carId from Cars group by Model)
We are nothing without our users ! You can help us offer even more high quality content. Please share our page !
Best quality Asp .Net Ajax Control Toolkit tutorials.

Give your valuable comments.

1 + 7 =
About Us | Terms of Use | Privacy Policy | Disclaimer | Contact Us Copyright © 2012-2020 CodingFusion
75 Important SQL Server queries you should know