在 Jet 引擎 (Access) 数据库中存储 64 位整数?
将 64 位整数存储到 Jet Engine 数据库中的最佳/最有效/内存消耗更少的方法是怎样的?我很确定它们的整数是 32 位。
How would it be the best / most effective / less memory consuming way to store a 64 bits integer into a Jet Engine database? I'm pretty sure their integers are 32 bits.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
MSAccess 支持的最大整数是
NUMBER
(FieldSize=LONG INTEGER
) 类型但这不是 64 位。
http://msdn.microsoft.com/en- us/library/ms714540(v=vs.85).aspx
要存储大至 64 位的数字,您需要使用
DOUBLE
或DECIMAL
类型,但DOUBLE
不会具有“整数精度”,并且DECIMAL
会产生开销或者您可以使用
CURRENCY< /code> 输入并忽略小数。
http://www.w3schools.com/sql/sql_datatypes.asp
有关更多详细信息您可以在此处查看所有数据类型的细微差别:
http:/ /office.microsoft.com/en-us/access-help/introduction-to-data-types-and-field-properties-HA010233292.aspx
编辑:尽管您在
DOUBLE
中的有效数字数量有限,正如@ho1在下面的评论中指出的那样。如果您的磁盘存储空间有限,您可以通过推断代码中的数字来使
CURRENCY
工作,但最好的选择可能是DECIMAL
The largest integer MSAccess supports is a
NUMBER
(FieldSize=LONG INTEGER
) typebut this is not 64 bits.
http://msdn.microsoft.com/en-us/library/ms714540(v=vs.85).aspx
To store numbers as large as 64 bits you will need to use the
DOUBLE
orDECIMAL
type, but will not have "integer precision" withDOUBLE
and you have overhead withDECIMAL
Alternatively you could use a
CURRENCY
type and disregard decimals.http://www.w3schools.com/sql/sql_datatypes.asp
For more details on the nuances of all data types you can look here:
http://office.microsoft.com/en-us/access-help/introduction-to-data-types-and-field-properties-HA010233292.aspx
EDIT: Though you will have a limited number of significant digits in
DOUBLE
as pointed out by @ho1 in the comments below.You can make
CURRENCY
work by inferring the digits in code if you are pressed for disk storage space but your best bet is probablyDECIMAL