DotNetCrazynow
ASP.Net, C#, Web API, MVC
Tuesday, 18 April 2017
How to Deleting duplicate rows from a table
USING CTE
with Test as
(
select * , row_number() over (partition by Emp_ID order by Emp_ID) as rank
from employee_test1
)
delete
from Test
where rank > 1
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment