February 13, 2019 at 9:26 pm
Comments posted to this topic are about the item What's the seed?
February 13, 2019 at 9:26 pm
Nice question, thanks Steve
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
February 13, 2019 at 10:38 pm
Good question thanks Steve.
...
February 14, 2019 at 4:37 am
Steve, I found something interesting (in SQL Server 2014). If I repeat the inserts after the reseed and select all rows from the table, I get duplicate rows numbered 1,2,3,1,2,3. How is this possible? Shouldn't it be 1,2,3,4,5,6?
February 14, 2019 at 5:06 am
Cary Hower-563110 - Thursday, February 14, 2019 4:37 AMSteve, I found something interesting (in SQL Server 2014). If I repeat the inserts after the reseed and select all rows from the table, I get duplicate rows numbered 1,2,3,1,2,3. How is this possible? Shouldn't it be 1,2,3,4,5,6?
This is quite correct. RESEED resets the starting value for IDENTITY.
Given that the column is not defined as unique,duplicates will be encountered.
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
February 14, 2019 at 5:12 am
Thanks Stewart. I have always used identity columns as primary keys and never realized that it wasn't unique in and of itself.
February 14, 2019 at 12:40 pm
If you create a primary key, then you do get uniqueness, but the identity property doesn't manage that. Common misconception
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply