AS SALAMO ALAIKUM WA RAHMATULLAH
WITH CTE (Fname,Lname, DuplicateCount)
AS
(
SELECT Fname,Lname,
ROW_NUMBER() OVER(PARTITION BY Fname,Lname ORDER BY Fname) AS DuplicateCount
FROM tbl_employee
)
DELETE
FROM CTE
WHERE DuplicateCount > 1
GO
--
MA ASALAAM
Passion 4 Oracle
WITH CTE (Fname,Lname, DuplicateCount)
AS
(
SELECT Fname,Lname,
ROW_NUMBER() OVER(PARTITION BY Fname,Lname ORDER BY Fname) AS DuplicateCount
FROM tbl_employee
)
DELETE
FROM CTE
WHERE DuplicateCount > 1
GO
--
MA ASALAAM
Passion 4 Oracle