Don't use deleted primary keys Don't use deleted primary keys sqlite sqlite

Don't use deleted primary keys


From https://www.sqlite.org/autoinc.html:

If the AUTOINCREMENT keyword appears after INTEGER PRIMARY KEY, that changes the automatic ROWID assignment algorithm to prevent the reuse of ROWIDs over the lifetime of the database. In other words, the purpose of AUTOINCREMENT is to prevent the reuse of ROWIDs from previously deleted rows.