sql server 删除重复数据

with cte as (
select GoodsId,Same_GoodsId,ROW_NUMBER() over(partition by GoodsId,Same_GoodsId order by (select 0)) as rn
from Gd_FindSame_Detail_temp
)

delete from cte where rn>1

 

posted @ 2024-04-09 19:23  普天2022  阅读(2)  评论(0编辑  收藏  举报