group_concat 长度限制,排序和设置分隔符

select aid,group_concat(bid order by bid separator ',') as bid_str from tbl group by aid;

SET GLOBAL group_concat_max_len = 1024;

show variables like "group_concat_max_len";

原文地址:https://www.cnblogs.com/chy1000/p/4749740.html