3 ms·
I am not sure of the current status, but when MERGE was new in MS SQL it was unusable for UPSERT I've used MERGE as an UPSERT using MATCHED/NOT MATCHED and SER
by dsp1234 11y ago
I am not sure of the current status, but when MERGE was new in MS SQL it was unusable for UPSERT
I've used MERGE as an UPSERT using MATCHED/NOT MATCHED and SERIALIZABLE/HOLDLOCK since it was introduced in mssql 2008. It was one of the first features I upgraded my code to use, and it worked out of the box with no issues.
- jeltz 11y agoSee this blog post for what I am talking about: https://www.mssqltips.com/sqlservertip/3074/use-caution-with-sql-servers-merge-statement/ https://www.mssqltips.com/sqlservertip/3074/use-caution-with... If PostgreSQL had gone the same route as MS SQL I would have expected a similar set of bugs. I suspect all of this have been fixed by now, but I do not follow MS SQL.