Reordering a database

  • Thread starter Thread starter Guy Delaney
  • Start date Start date
G

Guy Delaney

Once a database has essentially all the data inpoted into a table, how to
yor clean up your database by eliminating all deleted records so as to
recover lost numbers in the primary key?
 
Once a database has essentially all the data inpoted into a table, how to
yor clean up your database by eliminating all deleted records so as to
recover lost numbers in the primary key?

Why would you want to?

An Autonumber has one purpose, and one purpose ONLY: to provide a meaningless
unique identifier for a record. Generally autonumbers should not even be seen
by users; they're "under the hood", linking tables together. For that purpose,
values (1, 2, 3, 4), (1, 3, 41, 42) or (-3312918, 1054294224, -441241089) are
functionally equivalent. Autonumbers will ALWAYS have gaps.

If you really really want to do this, you'll need to create a new table with
an autonumber field and all the other fields in your table, and run an Append
query appending all the fields *except* the autonumber. However, if there are
other tables related to this table by the autonumber value, all THOSE tables
would need to be updated too - a rather difficult chore.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top