Identity Doubt

  • Dear All,

    Can anyone tell how SQL Server able to return the current_identity,next_identity,etc., (using identity function) in which system tables it stores the identity numbers?

    Does SQL Server has any table like User_sequences in oracle?

    Thank you.


    Balaji

  • Thanks for your reply.

    I want to know how SQL server internally handling this number, does they have any system table? (like sysobjects,sysindexes,etc.,)


    Balaji

  • Why do you want to know?  What are you trying to solve / accomplish?  Identity values will be generated differently depending on the type of the identity column, e.g. a GUID vs. an integer.  As in the case of a GUID, I would think that identity values would be generated on the fly rather than tracked somewhere.

  • Hi Balaji,

    Try browsing the details in the syscolumns in your database. There is a column called autoval.

    This table stores all the columns in the database.

     

    Bye


    M.Ali

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply