• Thank you,

    I am aware of the statements what you have posted,

    but my doubt is how sql server knows the next identity?

    Ex: i have a table with identity, i have inserted 10 records so the identity column will contain 1 to 10 value (I assume that the sql server will check the identity property (seed , increment) and last inserted identity value by looking at the table, based on increment it will add the next identity.)

    Suppose we are inserting one more 11th record into the above table (so the identity column will be having the value 11) if this insert was rolled back then the table will not contain the 11th identity value. If we have inserted one more record into the table this time 12 will be inserted into the identity column.

    How SQL Server knows that the next Identity is 12 instead of 11?

    🙂