欢迎来到我的的博客园,祝大家学有所成,早点实现自己的人生理想。

Mysql中使用Group_Concat将列组合进来。

一、上例子:

select left(areaId,7) as CityId,group_concat(stationId) ,NameCn from `wd-area` where type='cn3k' and areaId like '10110%' group by cityid order by cityid;

 

二、效果图:

  

 

posted @ 2017-06-21 11:18  宋兴柱  阅读(697)  评论(0编辑  收藏  举报