标签:
select PID,uanme=(select uname+‘,‘ from gz where gz.PID=a.PID for XML path(‘‘)) From gz as a group by PID
Sql Server实现多行数据按分组用逗号分隔成一行数据
原文地址:http://www.cnblogs.com/zhyp/p/5598187.html