I have an Android SQLite Database and I inserted some rows. After I deleted these rows the ID column continues from the last ID and I would like to restart the counting from 1.
Inside your .db file there's an table called sqlite_sequence
Each row has two columns 'name' which is the name of the table 'seq' a integer indicating the current last value at this table
You can update it to 0
But beware if your table use this id as the unique identifier.
Take a look at this answer: SQLite Reset Primary Key Field
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With