简体   繁体   English

int(x)和mediumint(x)之间的区别 - MySQL

[英]Difference between int(x) and mediumint(x) - MySQL

Difference between TinyInt / SmallInt / MediumInt / Int / BigInt in MySQL data type ? MySQL数据类型中的TinyInt / SmallInt / MediumInt / Int / BigInt之间的区别?
I want to use an [unsigned] integer field with 11 length, what should i use ? 我想使用11个长度的[unsigned]整数字段,我应该使用什么?

[I'm using PHPMyAdmin] [我正在使用PHPMyAdmin]

Type            Range
TINYINT         -128 to 127<br>
SMALLINT        -32768 to 32767<br>
MEDIUMINT       -8388608 to 8388607<br>
INT             -2147483648 to 2147483647<br>
BIGINT          -9223372036854775808 to 9223372036854775807

You should use BIGINT . 你应该使用BIGINT

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM