下面这是存储过程:
create proc Aa
@age int
as
if object_id('tempdb.dbo.##test') is null
begin
create table tempdb.dbo.##test
(
age int not null,
num int not null
)
insert into ##test values(1,1)
end
else
begin
update ##test set age=@age
end
go
create proc getTest
as
select * from ##test
exec Aa 2
exec getTest