Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine i f temp table exists
Message
 
 
To
18/11/2002 12:02:45
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00723905
Message ID:
00723919
Views:
7
IF object_id('tempdb..#MyTable') IS NOT NULL
  -- #MyTable exists
>Hi,
>
>What is best way to determine if a temp table (#MyTable) exists prior to running a query against it. Sysobjects in tempdb has them - but lists all for all sessions/users. I need to know if it exists for the current session/user.
>
>Thanks,
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform