MERGE vs SELECT/INSERT: Choosing an Idempotent Update Strategy Under Azure SQL Retry Policies
When a transient error (e.g., 4060, 40197) interrupts a write, Azure SQL’s retry policy can re‑issue the command. The goal is to guarantee that a retry does not produce duplicate rows. Azure’s retry policy applies to individual SQL statements but not automatically to multi‑statement stored procedures, which can lead to partial re‑execution and unintended dup