标签:
select staffId, (SELECT MachineIP+ ‘,‘ FROM STAFF_ATTENDANCE r WHERE r.staffId= 55 FOR XML PATH(‘‘) ) gg from STAFF_ATTENDANCE a group by a.staffId
将多个值保存到一条记录里
原文地址:http://www.cnblogs.com/change4now/p/5665194.html