Problem in ALTER TABLE statement
Hi All,
I am using an ALTER TABLE statement with using variables. e.g.
"
DECLARE @constrName varchar(255)
ALTER TABLE Test1 DROP CONSTRAINT @constrName
"
it is giving me the following error:
"Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near '@constrName'."
Is it because of i am using variable in alter stmt.
please guide me on the same. its very urgent. your help will be highly appriciated.
Regards,
Deepak
|