• hunchback (10/25/2013)


    Your thinking is correct but it get complicated depending on which sub-branch was specified as part of the statement. There is a comprehensive list in this article / topic in BOL.

    Inserting, Updating, and Deleting Data by Using MERGE

    http://technet.microsoft.com/en-us/library/bb522522(v=SQL.105).aspx

    Thanks for the link.

    To be honest I, think that this article is really an example of what I don't like about the MERGE docs. It hopelessly complicates the understanding of how to use MERGE by describing its implementation in terms of 5 (!) different join types depending on which clauses appear in the MERGE. That may be important for performance issues, but is not appropriate for understanding the logic of MERGE.

    Thanks for all your replies. It was good to have someone with some counter arguments. I thought this topic might stir up a few more opinions, but I guess it turned out just to be a pet peeve.