Discussion Locked
Deleting tables using store procedure
0 helpful
0 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am trying to delete table using store procedure by taking table name in local varial delcared and putting ling in store procedure as
set @cmdName = 'Drop table [dbo].[' + rtrim(ltrim(@tablename)) + ']'
exec @cmdname
Which returns me error, can any one help me?