SQL 拼接多个字段的值&一个字段多条记录的拼接
declare @s varchar(8000) set @s=''
select @s=@s+name+','
from syscolumns
where id=object_id('表名')
print left(@s,len(@s)-1)
declare @s varchar(8000) set @s=''
select @s=@s+name+','
from syscolumns
where id=object_id('表名')
print left(@s,len(@s)-1)