scenarios. 1. I have a source table containing only updates and I need to update a target table with the source table. 2. I have a source table containing updates and inserts. And I need to update/insert the target table with the source table. What is the best way of updating the target table?
I believe I can use the below methods.
1. Use Update syntax to update the target table with the source table. Use the insert syntax to insert new records.
2. Use delete and insert approach. Delete the records to be updated and insert all the records from the source table.
3. Use merge into syntax for upsert.
Which one do you recommend?
In terms of performance, is there a difference between the 2nd and 3rd method? Or it is just that the syntax is different but their performance is the same?