MOT identity

  • Comments posted to this topic are about the item MOT identity

  • 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”

  • Went for the documentation answer - 1 and 1.
    Ouch!

  • paul s-306273 - Tuesday, February 26, 2019 1:15 AM

    Went for the documentation answer - 1 and 1.
    Ouch!

    +1

    ...

  • Steve Jones - SSC Editor - Monday, February 25, 2019 9:51 PM

    Comments 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.

  • Not quite correct. Try using 0 for increment Y. It is disallowed.

  • paul s-306273 - Tuesday, February 26, 2019 1:15 AM

    Went for the documentation answer - 1 and 1.
    Ouch!

    +1

    ---------------------------------------------------------------------------------------
    The more you know, the more you know that you dont know

  • 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

  • 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:

  • 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.

  • 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?

  • 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