查询问题求教表A:a b c1 2 32 2 43 2 5想获得这个结果b c2 3,4,5谢谢[解决办法]select b,stuff((select ','+c from tb where a.b=b for xml path('')),1,1,'') as cfrom tb agroup by b