set @sql=‘select * from ‘+@table print @sql exec(@sql)
exec可以用来执行语句的
原文:http://www.cnblogs.com/CandiceW/p/4463143.html