The titled basically states it. If I have a bigint column with primary key and autonumber, and a record is deleted, will SQL Server ever reuse that now available value?The underlying issue is that I have a multi-user environment, and if I retrieve a record from the database into memory, then another user makes changes (like deleting and/or re-adding), if I do updates or deletes based on that ID in memory, is there a chance that I could be editing a record that was added in the background that doesn't truly represent the record I should be editing? I realize I could use Guids, but I'd really like to know if BigInt/Autonumber is safe in this scenario.Thanks!
Will SQL Server autonumber reuse a value if a record is deleted?
sql server
There's no such thing as AUTONUMBER in SQL Server, that I'm aware of.  What there is, is the IDENTITY property, which allows for the automatic creation of new values, such as for primary keys.  And IDENTITY is just a generator: it starts at a starting value and counts upwards.There are some advanced uses to make it loop, but you have to know what you're doing to invoke those.  So no, if you just use a normal IDENTITY 1, 1 on a column, and it's a BIGINT, for all intents and purposes it will never reuse a value.  (If you're able to exhaust the 64-bit range of numbers, that's a different problem...)