There is a large MS ACCESS database in which the creator decided to set the type of the 'ID' field as numeric in all tables, since it is impossible to change it. many links to other tables. It is necessary that the program assigns new entries 'ID' in order in the database.
1 answer
Aktsess knows how to autoincrement.
The fact that once it was done incorrectly is not a reason to make crutches even more - it is an occasion to gradually correct them.
If you need to find the maximum ID - well, okay, make select max(id) from tablename
, only you need to understand that when the database is loaded there will be problems and then - just return to the normal auto-increment.
- As for the "select max (id) from tablename ', thank you so much. I said that you can't fix it with auto-increment, because there are a lot of related tables in the database, plus the program is created for another program (not strange), and there is no source for the first one since she incorrectly creates, so one has to wriggle out like this. - l3m0n4ikk
|