心雨纷扬

 

行转列的处理。

  select a.id,stuff((select ','+[value] from tb as b where a.id=b.id for xml path('')),1,1,'') [value] from tb as a   group by a.id

posted on 2018-10-09 18:50  心雨纷扬  阅读(158)  评论(0编辑  收藏  举报

导航