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 - 2001-12-06 : 10:01:54
|
| Lou writes "How can i drop a table in a stored proc. when the table name is passed to the Stored Proc. as a Variable?Drop Table @tablename does not work....Any help would be appreciated.Lou" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
|
|
LarsG
Constraint Violating Yak Guru
284 Posts |
Posted - 2001-12-06 : 11:07:01
|
| You have to do it dynamically.exec('drop table ' + @tablename) |
 |
|
|
|
|
|