I have a question about MS SQL Servers SCOPE_IDENTITY - this is the explanation MSDN gives:
SCOPE_IDENTITY returns the last identity value generated for any table in the current session and the current scope.
Can someone provide a brief explanation on what current session and current scope means?
I just want to be **guaranteed** that I will get the right value if I say:
SqlCommand comm ....
comm.CommandText = "INSERT INTO ..... ; SELECT SCOPE_IDENTITY()"
even if there are other connections to this DB going on in other currently running applications.