int(M): M indicates the maximum display width for integer types.
mysql> drop table if exists t; mysql> create table t(id int zerofill); mysql> insert into t(id) values(10); mysql> select * from t; +------------+ | id | +------------+ | 0000000010 | +------------+ mysql> alter table t change column id id int(3) zerofill; mysql> select * from t; +------+ | id | +------+ | 010 | +------+ mysql> mysql> alter table t change column id id int(4) zerofill; mysql> select * from t; +------+ | id | +------+ | 0010 | +------+ mysql> mysql> insert into t(id) values(1000000); mysql> select * from t; +---------+ | id | +---------+ | 0010 | | 1000000 | +---------+
MySQL数据类型 含义(有符号) tinyint(m) 1个字节 范围(-128~127) smallint(m) 2个字节 范围(-32768~32767) mediumint(m) 3个字节 范围(-8388608~8388607) int(m) 4个字节 范围(-2147483648~2147483647) bigint(m) 8个字节 范围(+-9.22*10的18次方)
MySQL数据类型 含义 float(m,d) 单精度浮点型 8位精度(4字节) m总个数,d小数位 double(m,d) 双精度浮点型 16位精度(8字节) m总个数,d小数位
decimal(m,d) 参数m<65 是总个数,d<30且 d<m 是小数位。
MySQL数据类型 含义 char(n) 固定长度,最多255个字符 varchar(n) 可变长度,最多65535个字符 tinytext 可变长度,最多255个字符 text 可变长度,最多65535个字符 mediumtext 可变长度,最多2的24次方-1个字符 longtext 可变长度,最多2的32次方-1个字符
MySQL数据类型 含义 date 3字节,日期,格式:2014-09-18 time 3字节,时间,格式:08:42:30 datetime 8字节,日期时间,格式:2014-09-18 08:42:30 timestamp 4字节,自动存储记录修改的时间 year 1字节,年份
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有