I have an SQL table called tbl, im trying to add the columns A, B and C to it.
When i execute the command :
addcolumns = "ALTER TABLE SqlCreatedTbl ADD A char(50) ;";
cmd = new SqlCommand(addcolumns, conn);
The column is added perfectly and i can see it in the table !
However, when i try to add multiple columns, it does NOT work, it gives me an error..
the command im writting for adding multiple columns is the following:
addcolumns = "ALTER TABLE SqlCreatedTbl ADD ( A char(50), B char(50), C char(50) );";
the debugger highlights the line : cmd.ExecuteNonQuery(); and throws the following exception:
Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near '('.
ANY IDEA ? PLEASE HELP
View Complete Post