Results 1 to 4 of 4
  1. #1
    Join Date
    May 2002
    Posts
    12

    Unanswered: Reseeding an Identity column

    Is there an easy way to reseed an identity column in a table? The only way I know of is to explicitly insert the value into the table using SET IDENTITY_INSERT ON/OFF. For example, if I wanted to reset the value to 5, I could insert 4 into the table and then delete the row. The next inserted row will start at 5. Is there a better way?

  2. #2
    Join Date
    Mar 2001
    Location
    Lexington, KY
    Posts
    606
    Not that I am aware of. Identity columns really shouldn't be used to generate contiguous groups of numbers; that is not their design.

    Take a look at this paper:
    http://my.sybase.com/detail?id=860
    Thanks,

    Matt

  3. #3
    Join Date
    May 2002
    Location
    NY
    Posts
    4

  4. #4
    Join Date
    May 2002
    Location
    NY
    Posts
    4
    err... thats from MattR's sticky Important sybase topics thread

Posting Permissions

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