MERGE and UPDATE perform two different tasks. UPDATE only updates existing rows. MERGE tests to see if the row exists, performs an INSERT if not and performs and UPDATE if the row exists. If only UPDATEs are to be performed, the UPDATE should be used. If the additional functionality is required, then MERgE is a much better and much better performaing answer than two passes, one to do the UPDATEs and one to do the INSERTS.
↧