SQL,如何删除订单号重复的数据,只保留一条数据比如:多个订单号--暂时只找到这种方法,还有别的方法吗delete from 表名 awhere a.ctid = any(array (select ctid from (select row_number()over (partition by m.订单号), ctidfrom 名 m)t where t.row_number > 1));
delete from 表名 where id not in (不要删除的订单id)