reorder auto increment

C

cc96ai

MsAccess 2003,
we set primary key as AUTO INCREMENT,

e.g .
ID :
1 , 2, 3, 4, 5, 6, 7, 8, 9, 10

once we deleted 4,5,6
will become
1 , 2, 3, 7, 8, 9, 10

have any way that we can reorder the ID again ?
become
1,2,3,4,5,6,7

any suggestion ?

or we MUST retrieve the data and insert back into a new table ??
 
S

storrboy

MsAccess 2003,
we set primary key as AUTO INCREMENT,

e.g .
ID :
1 , 2, 3, 4, 5, 6, 7, 8, 9, 10

once we deleted 4,5,6
will become
1 , 2, 3, 7, 8, 9, 10

have any way that we can reorder the ID again ?
become
1,2,3,4,5,6,7

any suggestion ?

or we MUST retrieve the data and insert back into a new table ??


Something to consider - will changing the order affect related
records?
Exporting to a new table is the fastest way.
If the sequence of the numbers being linear is an issue for you,
AutoNumber is not a good choice of field type. The idea of that type
is to easily add a unique index *without* worrying about the sequence.
 

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

Top