Insert Update stored proc on SQL Server
Your assumption is right, this is the optimal way to do it and it’s called upsert/merge. Importance of UPSERT – from sqlservercentral.com: For every update in the case mentioned above we are removing one additional read from the table if we use the UPSERT instead of EXISTS. Unfortunately for an Insert, both the UPSERT and … Read more