sql输出以逗号隔开

结果为0,1,2,3,4
SELECT STUFF(( SELECT ','+convert(VARCHAR,id)FROM o_employ FOR XML PATH('')),1,1,'') AS UserName

posted @ 2021-12-15 11:21  丶Ronnie  阅读(247)  评论(0)    收藏  举报