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

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

  

posted @ 2017-06-01 17:54  方金  阅读(1411)  评论(0编辑  收藏  举报