Poppa Wallace

Poppa Wallace

  • NA
  • 189
  • 24.2k

SQL command to update column given ID

Jun 13 2012 7:05 AM
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)