回复: 如何在表中重复信息的筛选和抽取(高手指导)--在线等
直接使用SQL呢?
select *, 1 as [rank] into duplicated from table1 where 1 = 2;
with
tmp as
(select *, row_number()over(partition by id order by id) as [rank] from table1)
delete
from tmp
output deleted.* into duplicated
where [rank] > 1