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 |
SQLBoy14
Yak Posting Veteran
70 Posts |
Posted - 2014-04-24 : 00:52:16
|
Hi all,I have been using the temp table a lot for all my homework query but everytime when I stop the query in the middle of execution, I have to execute each line of Drop Table #tmptbl1 and so on until the last drop table #tmptbl. Is that any shortest way to handle temp table if we stop the query without manually highlight each line statement of Drop table #tmptbl.Thank youSQLBoy |
|
WAmin
Starting Member
16 Posts |
Posted - 2014-04-24 : 01:20:24
|
How about using Table variable?DECLARE @tmptbl AS TABLE(ID INT)Or you can look at the following linkhttp://blog.sqlauthority.com/2009/03/29/sql-server-fix-error-msg-2714-level-16-state-6-there-is-already-an-object-named-temp-in-the-database/ |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
|
|
|
|