Is @@IDENTITY specific to a userID or to a session ?
Posted on 1998-06-23
I have several kiosks connecting to a database using the same user id. Each kiosk creates records to a certain table in which there is an identity field. I wish to retrieve the value using SELECT @@IDENTITY. If Kiosk A inserts a record then Kiosk B inserts one before I send the SELECT @@IDENTITY from Kiosk A, which identity will I get. In other words, does MS-SQL keeps a value for each session (connection) or for each user id.