SQL 多行合并一行

select stuff((select ',' + CONVERT(VARCHAR(50),id)+'' from tab_menu  group by id for xml  path('')),1,1,'')

posted @ 2018-05-17 13:57  LuoCore  阅读(138)  评论(0)    收藏  举报