mysql删除表中重复的数据记录
DELETE FROM tt WHERE (uid, role_id) IN (SELECT b.uid,b.role_id FROM (SELECT uid,role_id FROM tt GROUP BY uid, role_id HAVING count(*) > 1) b) LIMIT 1