62,046
社区成员
发帖
与我相关
我的任务
分享
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
exec Aa 2;
exec getTest;
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
create table tempdb.dbo.##test
(
age int not null,
num int not null
)
insert into ##test values(1,1)