int(1) 或者说 int(10) 一般情况下有用起来没有半毛钱关系
你把int最大值塞进去int后面多少都能承受得住
这个数字的意义在于补齐 alter int字段 通过zerofill 可以补零
mysql> INSERT INTO `user` (`id`) VALUES (1),(10),(100),(1000);
Query OK, 4 rows affected (0.00 sec)
Records: 4 Duplicates: 0 Warnings: 0
mysql> select * from user;
+------+
| id |
+------+
| 0001 |
| 0010 |
| 0100 |
| 1000 |
+------+
4 rows in set (0.00 sec)