如下:用建立實表的方式
create proc t1
as
if exists select 1 from sysobjects where id=object_id('__Tmpdate')
drop table __Tmpdate
select ss=getdate() into __Tmpdate
go
create proc t2
as
exec t1
select * from __Tmpdate
create proc t1
as
if exists select 1 from sysobjects where id=object_id('__Tmpdate')
drop table __Tmpdate
select ss=getdate() into __Tmpdate
go
create proc t2
as
exec t1
select * from __Tmpdate
create proc t1
as
select ss=getdate()
go
create proc t2
as
create Table #t1(tdate datetime null)
insert into #t1(Tdate)
exec t1select * from #t1
接分吧!