行转列(FOR XML PATH)

SELECT (SELECT ac.ColName+',' FROM T1 AS ac FOR XML PATH('')) AS ColName,
       (SELECT ac.colTitle+',' FROM T1 AS ac FOR XML PATH('')) AS colTitle

 

posted @ 2014-08-02 21:16    阅读(542)  评论(0编辑  收藏  举报