我需要创建一个表(在 SQLite 中),其中有一列包含“-1”或“+1”。为了节省内存,最好不要使用“int”作为列的类型。所以,我想到了“smallint”和“tinyint”。但是 smallint 不是那么小(从 -32,768 到 32,767)并且 tinyint 只能是正值(从 0 到 255)。是否有任何其他选项或我可以在这些 twp 之间进行选择?
提前谢谢你。
最佳答案
SQLite 3 只提供一个 INTEGER
数据类型,它...
[...] is a signed integer, stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of the value.
关于sql - 我可以在 SQLite 中使用负 tinyint 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1509472/