关于SQL Server将一列的多行内容拼接成一行,合并显示在另外表中

 select '['+title_a+','+title_b +']' from A   for xml path('')

SELECT *, (select '['+title_a+','+title_b +']' from A where A.t_id=B.t_id   for xml path(''))  FROM B

posted @ 2018-05-27 17:27  jeremy1888  阅读(296)  评论(0编辑  收藏  举报