IDENTITY Info in System Catalog

  • Whether a column is an IDENTITY is defined by the flag 0x80 in the syscolumns.status column.

    But I cannot find IDENTITY seed and increment information in the system catalog. Where are those stored?

    Thanks.

    Michael

  • Never mind, found it. It is IDENT_SEED( 'table_name' )

    Thanks.

  • But how do I figure out if seed and increment were specified explicitly or not?

    For example,

    CREATE TABLE tbl_1 ( col_1 INT IDENTITY )

    versus

    CREATE TABLE tbl_1 ( col_1 INT IDENTITY( 1, 1 ) )

Viewing 3 posts - 1 through 2 (of 2 total)

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