I have a table which is as follows:
emp_name emp_address sex matial_status
uuuu eee m s
iiii iii f s
uuuu eee
This is not a query but a delete statement. It will delete/remove duplicate rows from your table
;with C as
(
select row_number() over(partition by DUPLICATE_VAARS_DECISION
order by NODE_EQ_NO) as rn
from yourtable
)
delete C
where rn > 1
If you are only interested in querying the table and get the non duplicates as a result you should use this instead.
;with C as
(
select *,
row_number() over(partition by DUPLICATE_VAARS_DECISION
order by NODE_EQ_NO) as rn
from yourtable
)
select *
from C
where rn = 1