oracle语法:
select country,wmsys.wm_concat(city) as city from test group bycountry
mysql语法:
select country,GROUP_CONCAT(city order by city separator",") as city from test GROUP BY country
sqlserver语法:
select country,sys_connect_by_path(city,',') as city from test
效果如图所示:
![](https://img-my.csdn.net/uploads/201304/01/1364801498_8630.png)