Guest User

Untitled

a guest
May 21st, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. Msg 208, Level 16, State 0, Line 1
  2. Invalid object name '#foo'.
  3.  
  4. Msg 3701, Level 11, State 5, Line 1
  5. Cannot drop the table '#foo', because it does not exist in the system catalog.
  6.  
  7. IF object_id('tempdb..#foo') IS NOT NULL
  8.  
  9. CREATE TABLE #foo (bar int)
  10. GO
  11. CREATE TABLE ##bar (foo int)
  12. GO
  13. SELECT object_id('tempdb..#foo'), object_id('tempdb..##bar')
  14. GO
  15.  
  16. SELECT object_id('tempdb..#foo'), object_id('tempdb..##bar')
Add Comment
Please, Sign In to add comment