Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine i f temp table exists
Message
 
 
To
21/11/2002 13:35:24
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00723905
Message ID:
00725369
Views:
9
>>
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,
>
>
>thanks Sergey ....

You're welcome.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform