• @@Identity is not a safe option so try SCOPE_IDENTITY( ), see BOL.