I have two small tables (~3K rows) and I have to update data in one table from the other table. I can perform the required operations with both MERGE and UPDATE statements. Which one should I prefer to use? And what if I have to support scalablity also i.e. the tables can grow in future.
Asked
Active
Viewed 60 times
0
-
3`MERGE` = `UPDATE` + `INSERT`. If you aren't doing any inserts than just use an UPDATE. Both scale about equally. – D Stanley Aug 31 '15 at 17:40
-
What semantics do you want if there are multiple possible source rows to a single target row? Undeterministic results or an error message? – Martin Smith Aug 31 '15 at 17:42
-
Like @DStanley said, `MERGE` is generally used to perform both update and insert. So, a simple join update might suffice in your scenario. – FutbolFan Aug 31 '15 at 17:43