mysql> create table test_num(id int(6) zerofill);
Query OK, 0 rows affected (0.20 sec)
mysql> insert into test_num values(203);
Query OK, 1 row affected (0.02 sec)
mysql> select * from test_num;
+--------+
| id |
+--------+
| 000203 |
+--------+
1 row in set (0.00 sec)
转载于:https://my.oschina.net/jiangchike/blog/213702