How can I update the KEY_ROWID number in SQLite database after deleting a row from the database?
CASE 1:
For example, if I have five rows in the database, maximum KEY_ROWID is
You can reset the sequences if you're deleting all data;
DELETE FROM test;
DELETE FROM sqlite_sequence WHERE name='test';
As for renumbering primary keys when there is still data in the table, I'd sincerely advise against it, since any foreign keys that reference your table will be broken.