Some Caution on Using ROWIDs for Primary Keys in Sqlite 3 - Leon Mika
lmika.org·14h
🗄️Database Design
Preview
Report Post

I’ve noticed that relying on ROWIDs for primary keys in Sqlite 3 tables can result in IDs being reused. If you insert a row that is given a ROWID of 1, delete it, then insert another row, that second row will also be given a ROWID of 1. At first I thought it was just the Go port I was using, but I also tried a package that uses the C library and I observed the same thing. It’s reproducable using the sqlite3 CLI tool:

Auto-generated description: A terminal window displays SQLite commands and outputs, including creating and modifying a table with text values.

This shouldn’t be an issue normally, but I have been trying to enable [foreign …

Similar Posts

Loading similar posts...