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 |
|
khufiamalik
Posting Yak Master
120 Posts |
Posted - 2009-02-19 : 08:49:50
|
| Hello All, My DB name is PrizeDB, and I have created a Temporary table in my SP.the name of Table is #PrizeInfoTable.I want to drop it,can some one give me the exact code that how to drop it.Thanks in advance |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-02-19 : 08:51:08
|
| drop table #PrizeInfoTable |
 |
|
|
khufiamalik
Posting Yak Master
120 Posts |
Posted - 2009-02-19 : 08:53:53
|
| should I check it like IF OBJECT_ID('tempdb..#PrizeInfoTable') IS NOT NULL DROP TABLE #PrizeInfoTable;even my database name is PrizeDB |
 |
|
|
NeilG
Aged Yak Warrior
530 Posts |
Posted - 2009-02-19 : 08:54:05
|
| use PrizeDbDrop Table #PrizeInfoTable |
 |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-02-19 : 09:02:53
|
quote: Originally posted by khufiamalik should I check it like IF OBJECT_ID('tempdb..#PrizeInfoTable') IS NOT NULL DROP TABLE #PrizeInfoTable;even my database name is PrizeDB
Thats perfect. |
 |
|
|
|
|
|