sql 多行转换为一行

 

select 字段1, [val]=(
select 字段2 +',' from 表名 as b where b.字段1 = a.字段1  for xml path('')) from 表名 as a group by a.字段1xml

相关文章
相关标签/搜索