Advertisement
skorpk

Untitled

May 12th, 2022
1,317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.39 KB | None | 0 0
  1. create procedure dbo.test1
  2. as
  3. begin
  4.     IF OBJECT_ID('tempdb..#t') IS NOT NULL DROP TABLE #t
  5.     select 1 as Col1, 2 as Col2 into #t
  6.     exec test2
  7. end
  8. go
  9. create procedure dbo.test2
  10. as
  11. begin
  12.     IF OBJECT_ID('tempdb..#t') IS NOT NULL DROP TABLE #t
  13.     CREATE TABLE #t(Col1 int, Col2 int, Col3 int)
  14.  
  15.     insert into #t(Col1,Col2) values(4,5),(8,9)
  16.      update #t set Col3 = 24
  17.     select * from #t
  18. end
  19. go
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement