34,594
社区成员
发帖
与我相关
我的任务
分享
SQL code
declare @s varchar(8000)
select @s=isnull(@s+',','')+quotename(name) from syscolumns where id=object_id('news') and name not in('长字段1','长字段2')
exec('select '+@s+' from news')
declare @s varchar(8000)
select @s=isnull(@s+',','')+quotename(name) from syscolumns where id=object_id('news') and name not in('长字段1','长字段2')
exec('select '+@s+' from news')