MySQL 8.4 Release Notes
MySQL 支持 SQL 标准整数类型 INTEGER(或 INT)和 SMALLINT。作为标准的扩展,MySQL 还支持整数类型 TINYINT、MEDIUMINT 和 BIGINT。下表显示了每种整数类型所需的存储和范围。MySQL supports the SQL standard integer types
INTEGER (or INT) and
SMALLINT. As an extension to the standard,
MySQL also supports the integer types
TINYINT, MEDIUMINT, and
BIGINT. The following table shows the
required storage and range for each integer type.
表 13.1 MySQL 支持的整数类型所需的存储和范围Table 13.1 Required Storage and Range for Integer Types Supported by MySQL
| 类型Type | 存储(字节)Storage (Bytes) | 最小有符号值Minimum Value Signed | 最小无符号值Minimum Value Unsigned | 最大有符号值Maximum Value Signed | 最大无符号值Maximum Value Unsigned |
|---|---|---|---|---|---|
TINYINT |
1 | -128 |
0 |
127 |
255 |
SMALLINT |
2 | -32768 |
0 |
32767 |
65535 |
MEDIUMINT |
3 | -8388608 |
0 |
8388607 |
16777215 |
INT |
4 | -2147483648 |
0 |
2147483647 |
4294967295 |
BIGINT |
8 | -263 |
0 |
263-1 |
264-1 |