I have a table in libreoffice base, with a column named id. This column is set as auto-increment
for some reason the counting failed there:
How to get back to the correct counting, before_value + 1 … ?
e.g. reset the counter? how?
I have a table in libreoffice base, with a column named id. This column is set as auto-increment
for some reason the counting failed there:
How to get back to the correct counting, before_value + 1 … ?
e.g. reset the counter? how?
Run this from main screen menu Tools->SQL...
alter table "your_table_name" alter column "your_field_name" restart with XXX
Where XXX = number to restart with.
Not sure what you mean by “counting failed”. The actual value of the field shouldn’t matter when auto incrementing. You will end up with gaps when deleting records. Those numbers are not re-used.
Edit: NOTE this will NOT re-sequence the counter.