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
What's the Maximum Value of smallint(6) unsigned in MySQL?
提问by Steven
What's the maximum value of smallint(6) unsigned
in MySQL?
smallint(6) unsigned
MySQL中的最大值是多少?
回答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 个字节