Hi CsharpCorner,
I need to add columns to an existing table by using the stored procedure. i.e by passing the tablename as a parameter i need to add the 3 columns by executing the stored procedure and update the columns with some values .please advise me...
Thanks
Hari

ketan borsdiyaPosted Jul 8, 2016, 1:18 AM
Nitin SontakkePosted Jul 8, 2016, 12:31 AM
Raja TPosted Jul 7, 2016, 1:33 PM
so u know what the columns names or not ? if yes/no means it can easy ...
when you calling SP with parameter table name and if you know what are the columns means send again another parameter
like fieldname...so u can write code likeas
begin
alter table 'tablename'
add 'columnname1' varchar size 100
add 'columnname2' varchar size 100
add 'columnname3' varchar size 100
end