1. 程式人生 > >Mysql資料庫查詢重複欄位

Mysql資料庫查詢重複欄位

select * from promotion_hanging_user_info a where (a.handing_activity_id,a.openid) 
in (select handing_activity_id,openid from promotion_hanging_user_info group by handing_activity_id,openid having count(*) > 1)