Easy Identity column question

  • Happy Easter, BTW

    I have been uploading lots of data from a legacy program and my PK is an identity column. In the course of things, I have appended and deleted rows as needed. In that identity column, I might have rows:

    PK

    1

    2

    3

    5453

    5454

    5455

    Where the 1, 2, 3 represent the rows I originally added, and now if a row is added, instead of 4 I get some huge number. How can I tell SQL that I'd like to increment beginning with the next number after the last row in the table (not skipping thousands of numbers)?

    Thanks,

    Sam

     

  • From BOL:

    DBCC CHECKIDENT ('table_name', RESEED, new_reseed_value)



    Mark

  • Appreciate it. Reseeding... yes, that's what I am doing to do. 🙂 I think I've got it licked.

    Sam

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

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