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

时间:2017-06-21 12:52:55   收藏:0   阅读:140

一、上例子:

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;

 

二、效果图:

  技术分享

 

原文:http://www.cnblogs.com/songxingzhu/p/7058632.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!