1.数字类型
对于整数数据类型,M表示最大显示宽度。最大显示宽度为 255。显示宽度与类型可以存储的值范围无关,对于浮点和定点数据类型, M是可以存储的总位数。
UNSIGNED (无符号)ZEROFILL(补零)
select CONCAT(date(now()),"-",test_int) test_int from test_number
[
](http://blog.leanote.com/post/weibo-007/mysql_float_double_decimal)
1.1 整数类型
| 类型 | 存储(字节) | 有符号的最小值 | 最小值无符号 | 最大值有符号 | 最大值无符号 |
|---|---|---|---|---|---|
| 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 |
1.2 浮点类型
DECIMAL 65
http://blog.leanote.com/post/weibo-007/mysql_float_double_decimal/
1.3 位值类型
https://www.educba.com/mysql-bit/
