MySQL-常用数据类型

一/数值型

整型:int(integer):4字节, bigint:8字节

浮点型:float:4字节,单精度,小数位数6~7位,double:8字节,双精度,小数位数15~16位


二/字符串型

字符串:char:1字节(256字符),varchar:变长(节省空间,不利于索引),65535个字符   

大字符串:

text/longtext:65535字符/40亿+,存储长文本(博文、小说...) 

长文本text,最多65535字符,longtext最大存储字符达到40亿+

二进制:blob/longblob:二进制文本(以文本的形式存储01字节信息),存储容量65K/4G   


三/时间日期类

日期:date:20180507   

时间日期:datetime:20180507144200   


            

猜你喜欢

转载自blog.csdn.net/lenovoa68e/article/details/80376846