Please stop using this UPSERT anti-pattern There is a very common anti-pattern you should avoid, involving updating a row if it exists and inserting it if it doesn't. See how to avoid race conditions and deadlocks. Aaron Bertrand ◆ September 2, 2020 5