title: How to modify a constraint on a SQL Server table from c#?
body: <p>I want to modify a constraint on a SQL Server table from C# code. Is it possible to do? </p>
  
  <p>Please help.</p>
  
  <p>Here is a sample code for update that I use.</p>
  
  <pre><code>using (SqlConnection connection = new SqlConnection(connectionString))
  using (SqlCommand command = connection.CreateCommand())
  { 
        command.CommandText = "UPDATE Student(LastName, FirstName, Address, City) 
                               VALUES(@ln, @fn, @add, @cit) WHERE LastName='" + lastName + "' AND FirstName='" +  firstName+"'";
        connection.Open();
  
        command.ExecuteNonQuery();
  
        connection.Close();
  }
  </code></pre>