February 10, 2019 at 12:21 am
Comments posted to this topic are about the item IDENTITY_INSERT
God is real, unless declared integer.
February 10, 2019 at 12:23 am
Nice question to start the week thanks Thomas.
...
February 10, 2019 at 10:15 pm
Nice tricky one to start the week on, thanks Thomas
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
February 11, 2019 at 1:47 am
Yes, tricky one.
Couldn't find this properly explained (set identity_insert) so went for 3/4.
February 11, 2019 at 1:57 am
paul s-306273 - Monday, February 11, 2019 1:47 AMYes, tricky one.
Couldn't find this properly explained (set identity_insert) so went for 3/4.
..., but thinking about it, the next insert after i = 104 would give you a duplicate!
February 11, 2019 at 5:17 am
A good question.
In the explanation:
So although we deleted the row with i = 104 (while IDENTITY_INSERT is still ON) it does not reuse this value nor does it use / fill the gap between 3 and 102.
Note that whether IDENTITY_INSERT is turned OFF either before or after the row is deleted, the result is the same. It doesn't reuse the value.
February 11, 2019 at 6:38 am
nice and simple,
was looking for the trick/gotcha but couldn't find one,
thanks for the questions
---------------------------------------------------------------------------------------
The more you know, the more you know that you dont know
February 12, 2019 at 8:43 am
Thanks for this instructive question.
- webrunner
-------------------
A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply