February 25, 2019 at 9:51 pm
Comments posted to this topic are about the item MOT identity
February 25, 2019 at 9:52 pm
Nice question, thanks Steve
once again, BOL is questionable....
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
February 26, 2019 at 1:15 am
Went for the documentation answer - 1 and 1.
Ouch!
February 26, 2019 at 2:02 am
paul s-306273 - Tuesday, February 26, 2019 1:15 AMWent for the documentation answer - 1 and 1.
Ouch!
+1
...
February 26, 2019 at 2:02 am
Steve Jones - SSC Editor - Monday, February 25, 2019 9:51 PMComments posted to this topic are about the item MOT identity
OPS! I don't find the updated documentation and I can't try it.
In the example script the clause "WITH (MEMORY_OPTIMIZED=ON)" is missing.
February 26, 2019 at 4:57 am
Not quite correct. Try using 0 for increment Y. It is disallowed.
February 26, 2019 at 5:26 am
paul s-306273 - Tuesday, February 26, 2019 1:15 AMWent for the documentation answer - 1 and 1.
Ouch!
+1
---------------------------------------------------------------------------------------
The more you know, the more you know that you dont know
February 26, 2019 at 6:41 am
Are you sure that's right? In the page the answer links to, I see this:
As others have pointed out, this documentation also contradicts your answer:
https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/implementing-identity-in-a-memory-optimized-table?view=sql-server-2017
Thank you
Be still, and know that I am God - Psalm 46:10
February 26, 2019 at 6:50 am
This is what I get in SQL Server 2017 when I attempt to create a memory-optimized table with initial and increment both equal to 5:
February 26, 2019 at 7:28 am
I liked the question too and got it right but although 0 is a valid integer it is not ever valid for the increment "Y" value.
February 26, 2019 at 3:04 pm
I don't get it. All the documentation links posted say it has to be 1 and 1 for memory-optimized tables. The example posted above shows an error message stating it has to be 1 and 1. The code in the question does not include WITH(MEMORY_OPTIMIZED=ON) so technically anything could be used for the IDENTITY in just that fragment. But it is stated that memory-optimized is the intended goal and that fragment is not terminated with a semicolon. One would assume that WITH(MEMORY_OPTIMIZED=ON) is the next line after the code shown.
So where is the evidence that anything other than (1,1) works with memory optimized tables?
February 26, 2019 at 8:55 pm
Apologies for this. I misplaced the testing script, but only 1 should be allowed.
Not sure what I was thinking.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply