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
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Tapan PatelRank #614 · 3.9K reputationPosted Sep 29, 2017, 8:51 AM EDT