IDENTITY property question

  • Hello,

    I set up the following column with the IDENTITY property:

    Permnum Int IDENTITY (1,1) not null

    The data in the applicable table has since been deleted, and I need to reset the IDENTITY back to 1. 

    I've looked in BOL and I can't put my finger on it.

    Thanks!

    CSDunn

     

  • You can use DBCC CHECKIDENT (<TableName>, RESEED, 1) or just truncate the table.



    --Jonathan

  • Thanks! I thought that Truncating the table should work, but it did not occur to me at the time to sort by my IDENTITY column after the new data went in. So it appeared to me that Truncate was not causing the field to reseed.

    CSDunn

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

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