Well, you could call it a shiny shoe integer.  the "shiny shoe" part is just 
ignored, just like your use of the word unsigned.  And no, the value stored was 
a IEEE-754 double precision floating point so you got to keep the high 53 bits 
are the rest were discarded (this is because the value was numeric (that is, 
all numbers) and could not fit in a signed integer, so the only way to store 
something of that magnitude is as a double-precision float.


---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-----Original Message-----
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Conor Lennon
>Sent: Thursday, 27 September, 2018 10:10
>To: sqlite-users@mailinglists.sqlite.org
>Subject: Re: [sqlite] storing unsigned 64 bit values
>
>
>
>On 27/09/18 17:03, Simon Slavin wrote:
>> On 27 Sep 2018, at 11:53am, Conor Lennon
><clen...@druidsoftware.com> wrote:
>>
>>> e.g. 18446744073709551615 (one less than 2 to the power of 65)
>>>
>>> I seem to have managed to store this value in a database.
>> What is the affiliation for that column ?  Did you declare it as
>INTEGER or something else ?
>>
>> Simon.
>>
>
>It's declared as a unsigned integer
>
>sqlite> .schema mytable
>CREATE TABLE IF NOT EXISTS "mytable" (
>    "id" integer NOT NULL PRIMARY KEY,
>    "bigvalue" integer unsigned NOT NULL UNIQUE
>);
>
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to