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