Remove Duplicate Rows from a Table in SQL Server:
Duplication rows in database tables will exists by running the data repeatedly With out having the primary key on table. Here is an example to remove the duplicate records from a table in SQL Server
Please share this post if it's useful to you. Thanks!.
DELETE FROM Employee emp1 WHERE ROW_NUMBER()<>(SELECT MIN( ROW_NUMBER())FROM EMployee emp2 WHERE emp1.empname= emp2.empname)
Please share this post if it's useful to you. Thanks!.
0 comments:
Post a Comment
Share your thoughts here...