sql server单个字段列转行由,隔开

SELECT STUFF((SELECT ','+字段名 FROM  表名  for xml path('')),1,1,'')

  

原文地址:https://www.cnblogs.com/Gold-fangjin/p/6930085.html