declare @s varchar(8000) set @s=''select @s=@s+name+','from syscolumnswhere id=object_id('表名') print left(@s,len(@s)-1)