Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ms Sql Server 2000 Identity Columns Gaps

Status
Not open for further replies.

liquidtox

Programmer
Aug 18, 2002
5
CA
With regards to Identity columns in ms sql server 2000, what is the best way to manage the gaps after rows have been deleted?

I read somewhere about using :

DBCC CHECKIDENT (TableName, RESEED,1)
DBCC CHECKIDENT (TableName, RESEED)

But i think it only works if the rows are removed from the bottom of the table ... what about if the deleted rows are in the middle?

Or is it better to replace all identity columns with a regular Integer ID column (in which case where is the best place to generate the autoincrementing id number?)

tia.
 
the best way to manage the gaps? ignore them

best by far -- very, very far

if you manage the identity numbers correctly, no one, including yourself, should even know the gaps are there

rudy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top