T-SQL:
with a
as
(
select * from ( select row_number() over(partition by emp_id order by emp_id)[dup],* from Employee_Test)[samp]
)
delete from a where [dup]>1-------->to remove
--select * from a where [dup]>1----> to see
with a
as
(
select * from ( select row_number() over(partition by emp_id order by emp_id)[dup],* from Employee_Test)[samp]
)
delete from a where [dup]>1-------->to remove
--select * from a where [dup]>1----> to see
No comments:
Post a Comment