Unique record ID on table needs fixing

On my table, the unique ID needs fixing. There are several missing intermittenly, and a new record takes the one after the last one. I changed the missing ones to be in numerical order but a new record takes an ID after the last one. E.g. Before changing the last one was, say 80, after changing it is 75.
Now a new record starts from 81 instead of 76.
How can i correct this?

Thanks & regards

This is the guide - How to use the Ask site? - #3 by Hrbrgr

The actual values of an auto-ID follow technical requirements. It does not matter if it starts from 81 or 76. It only needs to be consistent with the referencing foreign keys. Automatic primary keys should not even appear in the user interface.

1 Like

You can use an ALTER TABLE command to reset the id, but actually there is no need to do this. (If you re-organise your ids they will be no “unique record id” but only “temporary ids, wich are unique inside your database at this moment”. Don’t store/reference in external places.) But as you already changed the ids, you can also do the alter table, but note: This may depend on the database you use as backend.