Results 1 to 3 of 3

Thread: ID Field Reset

  1. #1
    Join Date
    Sep 2003
    Location
    Hertfordshire, England
    Posts
    78

    Question Unanswered: ID Field Reset

    This morning I made a change to two tables in my live system. All I did was add a new column in each called 'suspense' with a data type of bit and a default value of '0'.

    When the users started using the system they noticed that the record ID numbers had reset and were starting from 1 and going up 2, 3, 4 etc. The last good id number was about 20500. The id columns are set as primary key with identity and increment of 1.

    This shouldn't happen should it? Is it a bug? I never touched the ID column, just added the new one.

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    I bet you made the change using Enterprise Mangler. EM tends to make these changes not with a simple alter table add column, but with a drop and re-create of the table. You can try running DBCC CHECKIDENT(table) on the table, which should reset the identity column nicely.

  3. #3
    Join Date
    Sep 2003
    Location
    Hertfordshire, England
    Posts
    78
    That's interesting. I am going to test that on my test system now to see what happens.

    Thanks!

Posting Permissions

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