SCOPE_IDENTITY

  • Can anyone explain the scope of SCOPE_IDENTITY() within a stored procedure...

    What if two seperate calls are made to the same stored procedure at the same time. Could an incorrect value be returned.

  • No, it will always return the correct value. Compare this behavior to @@Identity which returns the last identity inserted for that user.

    Andy

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply