------解决方案-------------------- exec('select '+ @name +' from test99')
------解决方案-------------------- select jan_2012 from test99
declare @name varchar(20) set @name='jan_2012' begin exec('select '+@name+' from test99') end
------解决方案-------------------- 第一个是字段值, 第二个是变量值.
------解决方案-------------------- select jan_2012 from test99
declare @name varchar(20) set @name='jan_2012/10' begin EXEC('select '+@name+' from test99') end
select jan_2012 from test99
declare @name varchar(20) set @name='jan_2012' begin EXEC('select '+@name+'/10 from test99') end