Performing joins in the from clause of an update is an Transact-SQL extension to the ANSI standard SQL syntax for updates.
update titles set total_sales = total_sales + qty from titles t, salesdetail sd where t.title_id = sd.title_id
The total_sales value is updated only once for each title_id in titles, for one of the matching rows in salesdetail. Depending on the join order for the query, on table partitioning, or on the indexes available, the results can vary each time. But each time, only a single value from salesdetail is added to the total_sales value.
update titles set total_sales = total_sales + (select isnull (sum (qty),0) from salesdetail sd where t.title_id = sd.title_id) from titles t