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