Remove duplicate record from a table
Hi frnds
How to remove duplicate records from a table?
I know from the below query but my table name is employee so y we used tempemp .
Remove Duplicate Records by using ROW_NUMBER()
WITH TempEmp (Name,duplicateRecCount)
AS.
(
SELECT Name,ROW_NUMBER() OVER(PARTITION by Name, Salary ORDER BY Name)
AS duplicateRecCount.
FROM dbo. Employee.
)
--Now Delete Duplicate Records