Hi all,
Suppose i have the following table
book
-----
id
name
genre
check_out_date
location_id
Can anyone post an example of an efficient stored procedure that only updates the book table where the passed in values are different from the current values in the table?
i.e. if i passed in values ( 1, "Slaughterhouse V", "Fiction", 10/10/2008, 54) and the values in the table are (1, "Slaughterhouse V, "Fiction", 10/24/2009, 70), it would only update the check_out_date and the location_id columns.
Update Book set check_out_date=@check_out_date (10/24/2009), location_id=@location_id (70).
Thanks in advance