sql - update only when values are different
- by BhejaFry
Hi folks,
In SQL Server 2008, how do i update fields in a table only if their values differ with the values in the update statement ?
For ex:
I have TableA with column FirstName whose value is 'Roger Moore' with an unique id of '007'.
Now, i am calling an update statement but it should update the 'FirstName' field only if value is something else other than 'Roger Moore'.
TIA