Yes.You can use.
Run following Script :
if exists(select name from sys.procedures where name='sp1')
drop proc sp1
go
create procedure sp1
as
begin
select * from #t1
end
go
Go
if exists(select name from sys.procedures where name='sp2')
drop proc sp2
go
go
create procedure sp2
as
begin
select 'SP1 Table' [Value] into #t1
exec sp1
end
go
exec sp2
Run following Script :
if exists(select name from sys.procedures where name='sp1')
drop proc sp1
go
create procedure sp1
as
begin
select * from #t1
end
go
Go
if exists(select name from sys.procedures where name='sp2')
drop proc sp2
go
go
create procedure sp2
as
begin
select 'SP1 Table' [Value] into #t1
exec sp1
end
go
exec sp2
No comments:
Post a Comment