删除重复记录,只留一条

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

原文地址:https://www.cnblogs.com/shiyi2014/p/13797119.html