Thursday, November 18, 2010

#temp are created before code execution starts

alter
@userid
proc testbigint as beginif (@userid = 1 )begin



print 'you gave 1 as input' select * into #temp from StudentBoardingReportTable end else beginprint 'you gave other than 1 as input : ' +convert ( nvarchar(10) , @userid)


select * into #temp1 from StudentBoardingReportTable end if ( @userid = 1)begin



select * from #temp drop table #temp end else begin

select * from #temp1 drop table #temp1 end end

No comments:

Post a Comment