Re: [sqlite] max length of integer?

2011-01-10 Thread luuk34
On 10-01-11 13:09, Simon Slavin wrote:
> On 10 Jan 2011, at 10:05am, KimTaein wrote:
>
>> What is the largest number that I can store in integer data type in sqlite?
>> I was not able to find it on sqlite website.
> You're right.  It's not in the obvious place.  You can, however, find it here:
>
> 
>
> If I understand it correctly, integers can take up 64 bits, so the largest 
> number would be about
>
> 1.84467441e19
>
sqlite> select typeof((9223372036854775807)) ;
integer
sqlite> select typeof((9223372036854775808)) ;
real
sqlite>

so, i think, its 2^64-1


Luuk


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] max length of integer?

2011-01-10 Thread Jay A. Kreibich
On Mon, Jan 10, 2011 at 12:09:02PM +, Simon Slavin scratched on the wall:
> 
> On 10 Jan 2011, at 10:05am, KimTaein wrote:
> 
> > What is the largest number that I can store in integer data type in sqlite?

  Integers are 64-bit signed values, so the range is -2^63 to (2^63 - 1).

> > I was not able to find it on sqlite website.

  It doesn't come right out an list a min and max value, but the
  data-types page indicates integers are 64-bit (8 byte) signed
  values:   http://www.sqlite.org/datatype3.html

> If I understand it correctly, integers can take up 64 bits, so the
> largest number would be about
> 
> 1.84467441e19

  Half that (+/-9.223e18).  Integers are always signed.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] max length of integer?

2011-01-10 Thread Simon Slavin

On 10 Jan 2011, at 10:05am, KimTaein wrote:

> What is the largest number that I can store in integer data type in sqlite?
> I was not able to find it on sqlite website.

You're right.  It's not in the obvious place.  You can, however, find it here:



If I understand it correctly, integers can take up 64 bits, so the largest 
number would be about

1.84467441e19

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users