mysql函数

GROUP_CONCAT(exp) 需与group by语句在一起使用

 SELECT username,GROUP_CONCAT(address) FROM pinjie GROUP BY username;

SELECT username,GROUP_CONCAT(address separator  ",") FROM pinjie GROUP BY username;

SELECT name ,GROUP_CONCAT(address order by address desc separator "#") address FROM t_aa GROUP BY name;

 

posted @ 2018-02-23 14:11  洞玄巅峰  阅读(114)  评论(0编辑  收藏  举报