eg:
declare @tableName varchar(20)
select top 1 @tableName from 表A exec('select * from '+@tableName)
declare @tableName varchar(20)
select top 1 @tableName from 表A exec('select * from '+@tableName)
declare @tableName varchar(20)
select top 1 @tableName = [table] from 表A exec('select * from '+@tableName)
select @sql='select * form ['+[table]+']' form 表a
exec(@sql)