Merge statement alternatives
Collected merge statement alternatives as their use can consolidate the insert/update sql code necessary but come with known risks
The Case of the Blocking Merge Statement (LCK_M_RS_U locks)
Use Caution with SQL Server’s MERGE Statement
SQL Server 2008 introduced the MERGE statement, which promised to be a simpler way to combine insert/update/delete statements, such as those used during ETL (extract, transform and load) operations. However, MERGE originally shipped with several wrong re
![](https://www.mssqltips.com/images_newsletter/3074_NewsletterImage.png)
MERGE (Transact-SQL) - SQL Server
MERGE (Transact-SQL)
![](https://docs.microsoft.com/en-us/media/logos/logo-ms-social.png)
And throwing in a NOLOCK
use with caution only
Serializable Lock Hints Detected - Brent Ozar Unlimited®
Serializable Lock Hints Detected If a query uses the SERIALIZABLE isolation level or HOLDLOCK hints, SQL Server will hold shared range locks until a transaction is completed. Normally SQL Server lets go of locks as soon as it’s done processing that part of a query, but here, the query has forced all…
![](https://www.brentozar.com/wp-content/uploads/2016/09/BOU-WhitePocket-giant.jpg)