By using these commnad of line we can delete duplicate records from a table
WITH [GetDuplicate] AS
(
SELECT RowNum = ROW_NUMBER() OVER (PARTITION BY Name ORDER BY Id DESC),
Name
FROM Employee
)
DELETE FROM [GetDuplicate] WHERE RowNum > 1
Gnanavel Sekar has 6+ yrs experience in IT industry as a Sr.Software Engineer and C# Corner MVP. he have strong skill in ASP.Net Core, Azure, C#,ASP.NET,MVC,WEB-API, Kendo UI,C3 Charts, OrchardCMS,Docusign,Jquery,SqlServ... Read more