首页 > 代码库 > 行转列(FOR XML PATH)

行转列(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