News for hackers. Stuff that matters.
Re:Upsert in SQL by kardianos on Monday September 25, 2023 @03:59PM (#37649722)
I agree. In SQL Server, merge comes with a number of quirks that cause me more pain when I try to use it. The ONLY reason I use MERGE today, isn't to merge, but to include non-inserted columns in the OUTPUT clause; only the merge statement can do that. This can be useful when you want to output a lookup from a source to a newly inserted identity (auto-increment) column.

Generally, stay away from MERGE. At least in SQL Server.

There are no comments on this comment yet.