mysql中字符串聚合连接

直接上代码:

select user_id, user_name from income_tl;
select user_id, group_concat(user_name order by user_name desc separator '|') sum_string from income_tl group by user_id;

运行结果:

mysql中字符串聚合连接_第1张图片


你可能感兴趣的:(mysql,聚合函数,sum_string)