当前位置:Gxlcms > 数据库问题 > MySQL数据类型

MySQL数据类型

时间:2021-07-01 10:21:17 帮助过:19人阅读

unsigned DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

 

这里的10,表示什么意思

本身没有意义,只有与zerofill配合在一起,才会起作用

mysql> create table c( a int(3) zerofill,b int(3) zerofill);
Query OK, 0 rows affected (0.16 sec)

mysql> insert into c select 1,2;
Query OK, 1 row affected (0.00 sec)
Records: 1 Duplicates: 0 Warnings: 0

mysql> select * from c;
+------+------+
| a | b |
+------+------+
| 001 | 002 |
+------+------+
1 row in set (0.00 sec)

mysql> select a-b from c;
ERROR 1690 (22003): BIGINT UNSIGNED value is out of range in ‘(`testDB`.`c`.`a` - `testDB`.`c`.`b`)‘

mysql> insert into c select 1111;
ERROR 1136 (21S01): Column count doesn‘t match value count at row 1  (列计数不匹配值计数)

 

MySQL数据类型

标签:分享   null   inno   ble   fill   sele   from   warnings   mysql数据类型   

人气教程排行