No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
Hi, I am trying to create a stored procedure to add a new column into a database from an ASP web application. The SQL Code for this is:- [code] ALTER TABLE tablename ADD COLUMN columnname columndatatype [/code] I have tried to insert this SQL into a stored procedure:- [code] CREATE … |
|
i want to add column in a table through following SP [code=sql]create procedure sp_addCol @tablename varchar (50) as DECLARE @tsql_TZ varchar (200) SET @tsql_TZ = 'ALTER TABLE [ '+@tablename+'] ADD timezone varchar (5)' EXEC(@tsql_TZ)[/code] whenever i try to execute this through EXEC sp_addcol 'MGV10SEP_MNPC_MNLD' ' it shows me the error … |