General discussion


Deleting tables using store procedure

By prashantdeshmukh ·
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?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Related Discussions

Related Forums