SQLite Forum

Start rowid from 0
Login
> Chances are high for an off-by-one-error

Only when you're investing semantic meaning into the value.

If I say the `id` is 2 instead of 3, and I tell you that the difference matters, then we have to ask "2 of *what*?" Are these countable objects?

The last time I tried to use an ID column for semantic meaning, I had to rebuild the database because it was an analog TV channel number, which then blew my 8-bit column width when we went first to digital cable and its logical 900 channels, then to direct digital systems with channel.subchannel notation, then to IPTV with multicast IP addresses as the "channel."

(All of this is pre-SQLite, so we couldn't just store strings in a formerly numeric column, even had that made sense in our program, which is written in a statically-typed programming language.)

So, what is your example of a case where 0-based IDs semantically matters?