On 2/11/19, J. King <jk...@jkingweb.ca> wrote:
>
> Rowids are signed integers and can be negative. The documentation does
> advise (somewhere...) against using negative rowids because they are larger
> (when stored) than the typical used range of positive ones, but that's it.

Exactly.  Negative rowids work fine.  It is only that the rowid values
are stored using the "varint" format which uses between 1 and 9 bytes
to store a 64-bit integer.  Small non-negative values like 1 and 2 use
just 1 byte.  But -1 and -2 and all other negative numbers use all 9
bytes.  It is only a disk space compactness issue, and in the OPs case
there are only two rows involved, so the impact will be unmeasurably
small.
-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to