SqlServer 行轉一列逗號隔開

SELECT
STUFF(
(SELECT ',' + convert(varchar(10),PID)
FROM tt
WHERE a='老王'
FOR xml path('')
),1,1,''
)xml

相關文章
相關標籤/搜索