Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 primary key increment adjustment

Author  Topic 

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2005-04-04 : 07:27:41
Hi,

say i have 100 records in my database, 1-100. I then add 10 records, so my next index value will be 111. I then delete the 10 records I just added.

Is there a way to reset my counter back to 100 instead of 111?

nr
SQLTeam MVY

12543 Posts

Posted - 2005-04-04 : 07:52:37
see dbcc checkident - the reseed option

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -