查找表中重复两次以上的订单号
select order_id from table_name group by order_id having count(1)>1
select distinct pr.order_id from table_name pr where exists
(select 1 from table_name prt where prt.id !=pr.id and pr.order_id =prt.order_id )
select distinct pr.order_id from table_name pr, table_name pr1 where pr.id !=pr1.id and pr.order_id =pr1.order_id

浙公网安备 33010602011771号