sql 怎麼刪除重複數據只保留一條?

with cte as(select *,row_number() over(partition by id order by id)rn from [chengpinid])
delete cte where rn>1 
相關文章
相關標籤/搜索