• The last example uses assumption on the identity column values in the main table.

    You can just add these values to the temp table.

    But Martin's solution is better



    See, understand, learn, try, use efficient
    © Dr.Plch