📅  最后修改于: 2022-03-11 15:05:19.699000             🧑  作者: Mango
declare @aa varchar (200)
set @aa = ''
select @aa =
case when @aa = ''
then CarName
else @aa + coalesce(',' + CarName, '')
end
from Cars
print @aa