当前位置:网站首页>mysql的列的数据类型详解
mysql的列的数据类型详解
2022-07-06 09:32:00 【萌新菜狗】
列的数据类型详解
数值型
- tinyint 十分小的数据 1个字节
- smallint 较小的数据 2个字节
- mediumint 中等大小的数据 3个字节
- int 标准的整数 4个字节
- bigint 较大的数据 8个字节
- float 浮点数 4个字节
- double 浮点数 8个字节(有精度问题)
- decimal 字符串形式的浮点数 金融计算的时候,一般是使用decimal
字符串
- char 字符串固定大小的 0-255
- varchar 可变字符串 0-65535 常用的变量 string
- tinytext 微型文本 2^8-1
- text 文本串 2^16-1 保存大文本
时间日期
- data YYYY-MM-DD 日期格式
- time HH:mm:ss 时间格式
- datatime:YYYY-MM-DD HH:mm:ss 最常用的时间格式
- timestamp 时间戳 1970.1.1 到现在的毫秒数 也较为常用
- year 年份表示
null
- 没有值,未知
- –注意,不要使用null进行运算,结果为null
边栏推荐
猜你喜欢
随机推荐
yum install xxx报错
Set up the flutter environment pit collection
Yao BanZhi and his team came together, and the competition experts gathered together. What fairy programming competition is this?
À propos de l'utilisation intelligente du flux et de la carte
Activiti directory (I) highlights
Install docker under windows10 (through Oracle VM VirtualBox)
JVM运行时数据区之程序计数器
Assembly language addressing mode
"One year after graduation, I won ACL best paper"
Only learning C can live up to expectations Top1 environment configuration
一个数10年工作经验的微服务架构老师的简历
was unable to send heartbeat
Restful style interface design
Activit零零碎碎要人命的坑
關於Stream和Map的巧用
服务器端渲染(SSR)和客户端渲染(CSR)的区别
MySQL optimization notes
Eureka single machine construction
ByteDance overseas technical team won the championship again: HD video coding has won the first place in 17 items
Typescript basic operations