标签:
SELECT a.*,GROUP_CONCAT(b.pri_name) FROM sh_role a LEFT JOIN sh_privilege b ON FIND_IN_SET(b.id,a.pri_id_list) GROUP BY a.id;
利用GROUP_CONCAT函数把相同信息的合并到同一个字段中
原文地址:http://www.cnblogs.com/hgj123/p/4386483.html