As Igor says, it's most likely the way you're creating your SQL query.
For example, if you're using C/C++ and you're trying to write a 64 bit
number to a string using the %d flag in sprintf(), if won't work
properly - you'd need to use %I64d for 64 bit numbers.

32-bit integers go up to (unsigned) 4,294,967,296, or (signed)
+/-2,147,483,648 - any higher and it's a 64 bit number.

For info, 64 bit integers go up to (unsigned) 18,446,744,073,709,551,616
(20 digits) or (signed) +/-9,223,372,036,854,775,808 (19 digits).

Thanks,
Nick.

-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik
Sent: 26 November 2009 15:22
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Huge Table with only one field -- efficientway to
create index ?

Thomas Lenders wrote:
> I tried creating the field as INTEGER, but 10 digit numbers where
> imported as 0.

SQLite uses 64-bit integers, for about 19 decimal digits. The problem
must be with the software that populates the table.

> I assume the field was created as 32 bit integer and invalid entries
got
> a default value.

SQLite doesn't distinguish between 32-bit and 64-bit integers. There's
nothing special you have to put into CREATE TABLE statement to enable
64-bit integers - they just work.

> I also tried LONGINT, BIGINT and INT64 but no joy. What would be the
> correct syntax for
> longer ints ?

Like I said, no special syntax is needed.

Igor Tandetnik

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

Reply via email to