mysql int 长度

Posted by Vincent on February 24, 2011

简单mark

---

 

root@bbc 09:32:30>create table tmp_xf(i int(4) zerofill);

Query OK, 0 rows affected (0.01 sec)

 

root@bbc 09:32:42>insert into tmp_xf values(12);

Query OK, 1 row affected (0.00 sec)

 

root@bbc 09:32:49>select * from tmp_xf;

+------+

| i    |

+------+

| 0012 |

+------+

1 row in set (0.00 sec)

###################

 

 

root@bbc 09:33:27>create table tmp_xf2(i int(4));

Query OK, 0 rows affected (0.00 sec)

 

root@bbc 09:33:43>insert into tmp_xf2 values(12);

Query OK, 1 row affected (0.00 sec)

 

root@bbc 09:34:03>select * from tmp_xf2;

+------+

| i    |

+------+

|   12 |

+------+

1 row in set (0.00 sec)

--

 

 


This work is licensed under a CC A-S 4.0 International License.