SQLite User Forum

Start rowid from 0
Login
The only "meaning" that can be attributed to an INTEGER PRIMARY KEY column is that it uniquely identifies a particular "row" (tuple) in the "table" (relation).

Given how these number are auto-generated if the INTEGER PRIMARY KEY is entirely and always computer generated and has not been futzed with (updated/changed/assigned) by an external source, and the number of insertions has not overflowed a signed 64-bit integer, that a numerically greater INTEGER PRIMARY KEY indicates that particular "row" (tuple) was inserted into the relation subsequently to the insertion of any "row" (tuple) in that relation with a lesser INTEGER PRIMARY KEY.

This holds notwithstanding the initial value.

Any other meaning is merely an artificial overload of meaning assigned by the designer.  It would be prudent to avoid assigning artificial overloads of meaning unless the can be held invariant for all eternity.

If you assume that your INTEGER PRIMARY KEY maps to an array, then how do you deal with deleting "element 0"?  You will have to renumber all your rows (INTEGER PRIMARY KEY) to maintain the mapping.

It appears that this is quite a common error that arises solely because of defective thinking!