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)
 
Best quality Asp .Net Ajax Control Toolkit tutorials.

Give your valuable comments.

Name
Email
Comment
5 + 2 =
 

About Us | Terms of Use | Privacy Policy | Disclaimer | Contact Us Copyright © 2012-2024 CodingFusion
50+ C# Programs for beginners to practice