Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where are my temporary tables?
Message
From
20/12/2004 16:34:03
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
 
General information
Forum:
Microsoft SQL Server
Category:
Database management
Miscellaneous
Thread ID:
00970374
Message ID:
00970824
Views:
19
Hi Sergey,

>You can use OBJECT_ID() function
IF OBJECT_ID('tempdb..#mytemptable')IS NOT Null
>  -- Temp.table exists
>  DROP TABLE mytemptable
>
Thanks for that, I'll note it for future use. I have since discovered that I can view what temporary tables are open during a T-SQL session by inspecting the contents of SysObjects in the TempDb database.

Regards,
Alan
Previous
Reply
Map
View

Click here to load this message in the networking platform