更新时间:2022-12-11 22:02:24
对于 SQL Server,您可以使用:
For SQL Server you can use:
select player,
stuff((SELECT distinct ', ' + cast(score as varchar(10))
FROM yourtable t2
where t2.player = t1.player
FOR XML PATH('')),1,1,'')
from yourtable t1
group by player