时间:2021-07-01 10:21:17 帮助过:2人阅读
1.原始
2.利用语句
SELECT B.tablename ,
LEFT(StuList, LEN(StuList) - 1) AS ArrayList
FROM ( SELECT tablename ,
( SELECT columnname + ‘,‘
FROM DataService
WHERE tablename = A.tablename
FOR
XML PATH(‘‘)
) AS StuList
FROM DataService A
GROUP BY tablename
) B
sql逗号
标签: