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 |
|
rudba
Constraint Violating Yak Guru
415 Posts |
Posted - 2009-03-17 : 10:02:50
|
| How do i check if temp table is exist or not, if exist then drop else create temp table.CREATE TABLE #tbl1 (idint,name char(30) ) |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2009-03-17 : 10:06:08
|
Here's one way:if object_id('tempdb..#tbl1') > 0begin drop table #tbl1endBe One with the OptimizerTG |
 |
|
|
rudba
Constraint Violating Yak Guru
415 Posts |
Posted - 2009-03-17 : 10:58:21
|
| thanks TG |
 |
|
|
|
|
|