查询出数据 SELECT a.ID AS KYMain_ID , ',' + a.Leader + ',' AS KYMain_Leader , ), b.TaskLeader) FROM TB_KYChildProject b WHERE b.MainProjectID = a.ID ) FOR XML PATH('') ), , , '') + ',' AS KYChild_Leader , ), b.Single_Leader) FROM TB_KYSubProject b WHERE b