[Solved] Rearrange the autoincrement column value after deleting some rows


When you have declared the column as INTEGER PRIMARY KEY, you don’t need to do anything because the database automatically uses the next value after the largest value in the table.

When you have declared the column as INTEGER PRIMARY KEY AUTOINCREMENT, the current counter is stored in the sqlite_sequence table. You can simply modify it by updating that table.

solved Rearrange the autoincrement column value after deleting some rows