title: SQLServer update set only when value has changed
body: <p>I have read many answers to this question that say it doesn't really matter if you update a column that hasn't changed but it can do and I wonder if there is a decent solution.</p>
  
  <p>We have an update proc that updates all the fields on a record - some of them possibly to the same value that they currently are.</p>
  
  <p>The issue we have is that we have an indexed view where this table is a parent to many thousands of child records and some of this tables fields are in that indexed view. Every time we do an update, even if it is effectively unchanged, it still does a lot of work in maintaining that indexed view.</p>
  
  <p>I want to be able to do an UPDATE SET and have some way of only setting if there value is different. Not a where clause because I still want the other fields updated.</p>
  
  <p>I guess Entity Framework does something like this in creating a dynamic update statement? Is there a simple solution for ADO.NET users using a stored proc for an update?</p>
  
  <p>tia</p>