• SQLkiwi (12/18/2010)


    Strikes me this is a great reason to use table variables instead of #temp tables in procedures.

    As long as you understand the consequences and limitations, and the optimizer can create decent plans with the row estimate it will use for the table variables. (It will always assume that it contains 1 row if I recall correctly.)