Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-07-15 : 10:25:53
|
| Sandeep writes "Hi, I'm creating a global temporary table in an application of mine using SQL Server 2000. In multi-user environment, if the temporary table already exists, creating that table again throws error. I understand that temporary tables don't have any information in the system tables of SQL Server DB. Then, how can I check whether temporary table already exists or not before creating a new one ?Thanks in advance,-Sandeep" |
|
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2004-07-15 : 10:45:17
|
| if exists(SELECT name from tempdb..sysobjects where name = '##MyGlobalTempTable')begin ..... create tableendelsebegin .... don't create tableendDuane. |
 |
|
|
|
|
|