1 group_concat([DISTINCT] 要连接的字段 [Order BY ASC/DESC 排序字段] [Separator '分隔符'])

SELECT GROUP_CONCAT(name,age ORDER BY age desc SEPARATOR "-") 
FROM person GROUP BY age;

 

 posted on 2017-02-28 16:10  夏末秋萍  阅读(104)  评论(0编辑  收藏  举报