mysql group_concat和find_in_set的使用

原先sql获取角色对应的权限信息:

select a.*, group_concat(b.auth_name) as auth_name from sh_role a left join sh_auth b on  find_in_set( b.auth_id, a.role_id_list) group by a.role_id;

posted @ 2018-01-19 18:04  zonehoo  阅读(145)  评论(0编辑  收藏  举报