SQL Server Performance

Identity Reset

Discussion in 'SQL Server 2005 General Developer Questions' started by deepak.baran, Oct 26, 2009.

  1. deepak.baran New Member

    Hi
    Is there anyway to rest the identity in sql server 2005. I want to generate receipt numbers for customers starting from 100001, 100002,..., 9999999. After recahing 9999999 it should again start form 100001.
    Please let us know how can this be done.
    Thanx..
    Deepak
  2. FrankKalis Moderator

    Sorry, but the identity property is really a bad choice for what you are trying to do. There is no guarantee that identity values will be consecutive or even gapless. I would rather built my own logic upon a normal integer typed column.
  3. Madhivanan Moderator

  4. deepak.baran New Member

    Thanx for the help.

Share This Page