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)
 identity column

Author  Topic 

putane.sanjay
Yak Posting Veteran

77 Posts

Posted - 2006-12-21 : 01:50:58
we have a table with identity column

For example, if your last generated number was ID=4, and you insert a new row (ID=5) then delete it, the ID that will be assigned to the subsequent record would be ID=6.
actually next id should be 5
how to solve this problem
give suggestions

regards

SANJAY PM

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-21 : 01:54:11

1 If you use identity column, you shouldnt worry about GAPs
2 Otherwise you have to generate the id by incrementing the maximum value by 1
3 In sql server help file, read about DBCC Checkident

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -