Deleting duplicate records in SQL Server:
Enjoy!!!!!!
WITH emp AS (SELECT ROW_NUMBER ( ) OVER ( PARTITION BY id, firstname ORDER BY id ) AS RNUM FROMtable1 )--select * from empDELETE FROM Emp WHERE RNUM > 1
Enjoy!!!!!!
No comments:
Post a Comment