您好,欢迎访问一九零五行业门户网

记录mysql 的group_concat函数用方法_MySQL

bitscn.com
表结构如下: 
id   rod_id  role_name 
1     1      超级管理员 
2     1      管理员 
3     1      系统管理员 
4     2      高级会员 
5     3      普通会员 
6     4      游客
实现sql 
select role_id,group_concat(role_name) from roles group by role_id;
这个在oracle10g以下版本中比较难实现,oracle10g中可以用wm_concat函数
作者“yipbxx”
bitscn.com
其它类似信息

推荐信息