declare @col varchar(1000) set @col='' select @col=@col+','+name from syscolumns where id=object_id('表名') and name not in('数量','备注) order by colid set @col=stuff(@col,1,1,'') exec('select '+@col+' from 表名')
declare @col varchar(1000) set @col='' select @col=@col+','+name from syscolumns where id=object_id('表名') and name not in('数量','备注') order by colid set @col=stuff(@col,1,1,'') exec('select '+@col+' from 表名')
set @col=''
select @col=@col+','+name from syscolumns where id=object_id('表名') and name not in('数量','备注) order by colid
set @col=stuff(@col,1,1,'')
exec('select '+@col+' from 表名')
declare @col varchar(1000)
set @col=''
select @col=@col+','+name from syscolumns where id=object_id('表名') and name not in('数量','备注') order by colid
set @col=stuff(@col,1,1,'')
exec('select '+@col+' from 表名')