关于动态表名的建立,怎么查询刚新建立的表

关于动态表名的建立,如何查询刚新建立的表?
create   procedure   prname
@tn   varchar(40)
as
declare   @tan   varchar(40)
declare   @tsql   varchar(4000)
set   @tan=tn
set   @tsql= 'create   table   '+@tan+ '(bid   int   identity(1,1),bname   varchar(10),fg   int) '
exec(@tsql)

select   *   from   @tan   --报错 "Must   declare   the   variable   '@tan '. "

为什么不能马上查询   @tan   表???       或者怎样写?   TKS!

------解决方案--------------------
select * from @tan
-----------------
也要动态的执行才可以.

表名在Sql语句中不能使用变量.
如果要用变量就要使用exec来动态的执行语句.
------解决方案--------------------
declare @tan varchar(40)
declare @tsql varchar(4000)
set @tan=@tn
set @tsql= 'create table '+@tan+ '(bid int identity(1,1),bname varchar(10),fg int)
insert '+@tan+ ' select ' 'yy ' ',34
select * from '+@tan
exec(@tsql)
------解决方案--------------------
create procedure prname
@tan varchar(40)
as
begin
--declare @tan varchar(40)
declare @tsql varchar(4000)
--set @tan=@tn
set @tsql= 'create table '+@tan+ '(bid int identity(1,1),bname varchar(10),fg int) '
exec(@tsql)

exec( 'select * from '+ @tan )
end

go