mysql tinyint smallint mediumint int bigint
类型 |
存储所占空间 (无论显示多少位) (单位 字节/bytes) |
存储数据范围 | 最大显示长度 |
tinyint | 1 |
-128 ~ 127 signed 0 ~ 255 unsigned |
3 |
smaillint | 2 |
-32768 ~ 32767 signed 0 ~ 65535 unsigned |
5 |
mediumint | 3 |
-8388608 ~ 8388607 signed 0 ~ 16777215 unsigned |
7 signed 8 unsigned |
int | 4 |
-2147483648 ~ 2147483647 signed 0 ~ 4294967295 unsigned |
11 |
bigint | 8 |
-9223372036854775808 ~ 9223372036854775807 signed 0 ~ 18446744073709551615 unsigned |
19 signed 20 unsigned |
create table mysql_int ( id int(11) primary key auto_increment, tinyint_a tinyint(3) not null, smallint_b smallint unsigned not null, mediumint_c mediumint(7) not null, bigint_d bigint unsigned not null );
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。