• Very valuable information to me. Too bad that te conclusion is wrong! There really is a need to perform modifications wherever @@identity or scope_identity() is used because they are not reliable:

    • after a rollback, the assigned identity is returned while it does not exist
    • when some other identity is assigned (in any table) between your insert and reading out @@identity you get that other identity

    So, my conclusion would be that it really is nescessary to rewrite code whenever you need the newly assigned identity.

    Regards,

    Hans van Dam