set @sql='select * from '+@table print @sql exec(@sql) 转载于:https://www.cnblogs.com/CandiceW/p/4463143.html