SQLite Forum

Questions about data types and overflow bounds
Login
> If so, did SQLite forget to apply the strategy to PRIMARY KEY?

Not 'forget' as much as 'not care'.  Values for INTEGER PRIMARY KEY fields are processed to make them useful for primary keys without the programmer having to deal with special cases.  SQLite can do anything up to and including picking a random integer, as long as it keeps the column suitable for use as a primary key.

<https://sqlite.org/faq.html#q1>

If you want fine-detail control over the values in an INTEGER key column, don't define it as a INTEGER PRIMARY KEY, define it as INTEGER UNIQUE and set the values you want.