mysql int 10 字段长度
2015-06-11 09:19
447 查看
The wrong understanding:
int 10 can store the number 1234567890, and int 3 can only store the number 123.
It should be that:
Yes, in type int ,the max value of number has nothing with it's length in mysql, it means int 10 is the same with int 3 in the max value of number.
A little difference is :
when the cloumn is set zerofill, create table a(b int(3) zerofill);
the value 5, will be 050 if int 3, and will be 0000000050 if int 10.
Thank you.
int 10 can store the number 1234567890, and int 3 can only store the number 123.
It should be that:
Yes, in type int ,the max value of number has nothing with it's length in mysql, it means int 10 is the same with int 3 in the max value of number.
A little difference is :
when the cloumn is set zerofill, create table a(b int(3) zerofill);
the value 5, will be 050 if int 3, and will be 0000000050 if int 10.
Thank you.
相关文章推荐
- mysql重设root 密码
- SQLServer触发器中 如何访问mySQL数据库?
- Mysql的Root密码忘记,查看或修改的解决方法(图文介绍)
- mysql新增用户
- Mysql主从复制(同步原理及搭建过程)
- MySQL InnoDB MVCC实现原理
- mysql时间相减的问题
- navicat for mysql 1042 catnot get hostname form your address
- CAS server 连接mysql的deployerConfigContext.xml配置
- 2015061004 - slf4和mysql,jdbc下载地址
- 报错:1130-host ... is not allowed to connect to this MySql server
- 使用jemalloc(或tcmalloc)优化MYSQL(安装步骤)
- MySQL安全配置向导mysql_secure_installation详解
- mysql密码丢失 ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
- mysqldump --flush-logs
- mysql主从同步
- 常见的MySQL Replication Error
- 无法连接mysql,请检查mysql是否已启动及用户密码是否设置正确
- MySQL 数据(数据库)迁移
- mysql表空间配置