It doesn't support unsigned integers natively, but most of the time it will
effectively upconvert to a larger signed integer.  In the case where it's
greater than the maximum int8 it obviously cannot upconvert, so uses a
floating point to approximate.

https://www.sqlite.org/datatype3.html

If you want a uint8, you can do this manually by converting the value to
int8 for SQLite insertion and then converting it again on the way out, i.e.
remembering that the signed bit is actually part of the number.
Alternatively storing it as text will be lossless, if less efficient.


On Mon, 16 May 2016 at 14:16 sanhua.zh <sanhua.zh at foxmail.com> wrote:

> I insert a value 18446744072708321492 as a integer into the table.
> In C code,sqlite3_column_type tells me is a type of 2, which is float
> point value.
> And I usesqlite3_column_double to get it. It returns18446744072708321280,
> which is already lost theaccuracy.
>
>
> Is SQLite not support Uint64 value, which bigger than the max of Int64?
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>

Reply via email to