在 Jet 引擎 (Access) 数据库中存储 64 位整数?

发布于 2024-12-01 00:56:29 字数 72 浏览 6 评论 0原文

将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁月流歌 2024-12-08 00:56:29

MSAccess 支持的最大整数是 NUMBER (FieldSize= LONG INTEGER) 类型
但这不是 64 位。

http://msdn.microsoft.com/en- us/library/ms714540(v=vs.85).aspx

要存储大至 64 位的数字,您需要使用 DOUBLEDECIMAL 类型,但 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) type
but 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 or DECIMAL type, but will not have "integer precision" with DOUBLE and you have overhead with DECIMAL

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 probably DECIMAL

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文