> Le 7 août 2019 à 09:43, Ainhoa B <ainhoabm1...@gmail.com> a écrit :
> 
> So, in SQLite, it doesn't matter if I create a table with a column of int,
> smallint or long type, it will always be trated as a INTEGER type of 64
> bits?

Regarding integers, yes they are always signed 64 bits integers.  See 
https://www.sqlite.org/datatype3.html for more details.

When physically storing the integer value, the internal format is varying on 
the magnitude of the value stored. There is nothing really lost (storage-wise) 
by using signed 64 bits integers at the interface level, even though your 
values would only be 0, 1, 3, and 12347.

SQLite will store signed integers using 8, 16, 24, 32, 48 or 64 bits payloads.  
Values 0 and 1 even only store their type, with no payload.

https://www.sqlite.org/fileformat2.html#record_format

—  
Best Regards, Meilleures salutations, Met vriendelijke groeten, Mit besten 
Grüßen,
Olivier Mascia

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

Reply via email to