SQL中BIGINT字段类型的限制是什么?

发布于 2024-10-07 14:46:40 字数 94 浏览 0 评论 0原文

SQL中BIGINT字段类型的限制是什么?

100000235882380 或 100000466411115 可以接受吗? (这是facebook的ID)

What is the limit of the field type BIGINT in SQL?

is 100000235882380 or 100000466411115 acceptable? (That is ID from facebook)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(4

夕嗳→ 2024-10-14 14:46:40

是的,根据int、bigint、smallint 和tinyint (Transact-SQL):

bigint -2^63 (-9,223,372,036,854,775,808) 到 2^63-1 (9,223,372,036,854,775,807)

Yes, according to int, bigint, smallint, and tinyint (Transact-SQL):

bigint -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)

猫性小仙女 2024-10-14 14:46:40

这取决于 RDBMS。例如,MySQL 上的 BIGINT 最大值为 9223372036854775807(有符号)或 18446744073709551615(无符号)。

有关完整信息,请参阅文档的数字类型部分细节。

It depends on the RDBMS. For example, the maxiumum values of a BIGINT are 9223372036854775807 (for signed) or 18446744073709551615 (for un-signed) on MySQL.

See the Numeric Types section of the docs for the full details.

回梦 2024-10-14 14:46:40

没什么好担心的。 BIGINT 可以存储比您拥有的值大得多的值。

最少可达 9,223,372,036,854,775,807。

Nothing to worry about. BIGINT can store much larger values than the ones you have.

At a minimum up to 9,223,372,036,854,775,807.

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