All the other posters that say they don’t worry about it, and that you should get spaces, are right. If business value matters, and this value does not exaggerate spaces, then do not use the identifier column.
FYI, if for any reason you want to remove spaces, most databases have a way to reconfigure automatic numbering to the number of your choice. This is a pain in the ass, and if you need to do this regularly, you should definitely not use the autonumber / identity field as described above. But here is the code for this in the SQL server:
DBCC CHECKIDENT ("Product", RESEED, 0)
This establishes that the product table starts with 1 (although if you have entries in the table, it will obviously skip the identification values already made.) Other RDBMS manufacturers have their own syntax, but the effect is about the same, so look "reseed identity" or "resed autonumber" in system help files or intervals.
Again: this is for special occasions and not for regular use. Do not put it in a stored procedure and force us all to come.
Ian Varley Nov 14 '08 at 2:15 2008-11-14 02:15
source share