删除重复记录,只留一条

delete OrderList
from OrderList as aa
left join (
select min(id) as id from OrderList
group by order_sn
) as bb
on aa.id = bb.id
where (Owner_id = 233617593)AND bb.id is null

posted @ 2020-10-11 13:15  石衣_2014  阅读(76)  评论(0编辑  收藏  举报