5
Reply

SQL command to update column given ID

Poppa Wallace

Poppa Wallace

Jun 13 2012 7:05 AM
1.7k
How do I update a column giving the ID 1 

command.CommandText = @"UPDATE ConfigTB SET 1Percent='@value' WHERE Id='@ID'";
command.Parameters["@ID"].Value = 1;
command.Parameters.Add("@value", SqlDbType.Int).Value = Convert.ToInt32("10");

Answers (5)