56,679
社区成员
发帖
与我相关
我的任务
分享
mysql> use test
Database changed
mysql> drop table if exists tb;
Query OK, 0 rows affected (0.16 sec)
mysql> create table tb(id int(3) zerofill );
Query OK, 0 rows affected (0.09 sec)
mysql> insert tb select 1
-> union all select 2
-> union all select 3;
Query OK, 3 rows affected (0.07 sec)
Records: 3 Duplicates: 0 Warnings: 0
mysql> select * from tb;
+------+
| id |
+------+
| 001 |
| 002 |
| 003 |
+------+
3 rows in set (0.00 sec)