• John,

    I agree that there's only one column to be updated here and so it won't make much difference for this example, but using the strictly ANSI syntax for UPDATE in SQL Server will cause the execution time to double if you update 2 columns and triple if you update 3 columns.

    As for the proprietary nature of SQL Server's UPDATE/FROM, do you really port code between different RDBMSs that often? It's just my opinion but, to me, true portability is an absolute myth because no one follows the ANSI standards 100% so might as well use the performance enriched proprietary features of each RDBMS.

    Also, even with the good code you wrote, there's still the high probability of more than one cost being available for the scenario given so far.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)