MySQL 中未签名的 smallint(6) 的最大值是多少?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1678296/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 14:26:12  来源:igfitidea点击:

What's the Maximum Value of smallint(6) unsigned in MySQL?

sqlmysqltypes

提问by Steven

What's the maximum value of smallint(6) unsignedin MySQL?

smallint(6) unsignedMySQL中的最大值是多少?

回答by longneck

According to official MySQL documentation, the maximum value of an unsigned smallint is 65535.

根据官方 MySQL 文档,unsigned smallint 的最大值为65535

The (6)portion has no effect on the allowed range of the column; it only affects the display of the column in the MySQL command line interface.

(6)部分对列的允许范围没有影响;它只影响 MySQL 命令行界面中列的显示。

回答by Herbert Marshall

An smallint unsigned max value is 65535 and uses 2 bytes

smallint 无符号最大值为 65535 并使用 2 个字节

MySQL Reference

MySQL 参考