Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005
    Posts
    2

    Unanswered: Identity Columns

    Where do I find the seed and increment values of the identity column in database.
    If possile can u suggest query for that Pl.
    Thanx in advance

    -ali

  2. #2
    Join Date
    Aug 2003
    Location
    Delft, The Netherlands (EU)
    Posts
    447
    select
    object_name(id) as table_name,
    name as column_name,
    ident_seed(object_name(id)) as seed,
    ident_incr(object_name(id)) as increment,
    ident_current(object_name(id)) as last_identity
    from
    syscolumns
    where
    autoval is not null
    and colstat & 1 = 1
    and status & 0x80 = 0x80
    and columnproperty(id,name,'IsIdentity') = 1


    Hope, this helps.
    Make everything as simple as possible, but not simpler! - A. Einstein
    DB Problems? DB Explorer, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool

  3. #3
    Join Date
    Jan 2005
    Posts
    2

    Thanks drblue

    Thanks DrBlue though its prettly late but today only i visited this thread and found you did reply.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •