How to handle update or insert situations
A slightly more efficient way (which will do at worst one seek/scan instead of two against the existing data):

UPDATE dbo.whatever SET ... WHERE key = @key;
IF @@ROWCOUNT = 0
BEGIN
  INSERT dbo.whatever ...
END


MERGE may be tempting, however there are a few reasons I shy away from it.


the syntax is daunting and hard to memorize
you don't get any more concurrency than the above approach unless you intentionally add specific locking hints
there are many unresolved bugs with MERGE and probably many more that have yet to be uncovered