当前位置:网站首页>今天和大家聊一聊mysql数据库的数据类型
今天和大家聊一聊mysql数据库的数据类型
2022-07-28 09:26:00 【MountainYanYL】
#数值类类型
int 普通的整数大小 int(10) # 常用来存储自增ID,以及linux时间戳
tinyint tinyint(1) #常用来存储状态值
float float(10) #单精度浮点型数据
double double(10) #双精度浮点型数据
decimal decimal(10,2) #定点小数 格式 0.22,
----------------------------------
#日期或时间类型
year # 格式 YYYY 如2017 ,年份 范围:1901-2155
date # 日期 YYYY-MM-DD 如 2019-02-27 1000-01-01~9999-12-3
time # 时间 HH:MM:SS 如 12:25:36
datetime # 日期时间 YYYY-MM-DD HH:MM:SS 如:2019-10-21 12:33:33
timestamp # 日期时间 YYYY-MM-DD HH:MM:SS
#字符串
char #定长
varchar # 不定长
text #文本
##效率上来说char 更高
边栏推荐
- C form application uses object binding DataGridView data binding
- 关于CLR GC调优的一些问题
- LeetCode - 哈希表专题
- FixedWindowRollingPolicy简介说明
- ARouter源码解析(一)
- MySQL master-slave architecture. After the master database is suspended and restarted, how can the slave database automatically connect to the master database
- View的工作原理
- Business visualization - make your flowchart'run'(4. Actual business scenario test)
- Introduction to shardingsphere (I)
- 《我的Vivado实战—单周期CPU指令分析》
猜你喜欢
随机推荐
对象到对象映射-AutoMapper
478-82(56、128、718、129)
多线程一定能优化程序性能吗?
SQL server, MySQL master-slave construction, EF core read-write separation code implementation
备受关注的Bit.Store,最新动态一览
就这么一个简单的校验,80%的程序员却做不到,更不理解!
Source code analysis of view event distribution mechanism
Inside database system distributed system
What is cross domain? How to solve the cross domain problem?
Use xposed to crack the software
使用IdentityServer出现过SameSite Cookie这个问题吗?
Opencv installation configuration test
2022 supplementary questions for the first session of Niuke multi school
OSS direct upload rails service practice
MATLAB的符号运算
Edge团队详解如何通过磁盘缓存压缩技术提升综合性能体验
MATLAB启动慢解决措施
MATLAB的实时编辑器
Common tool functions are constantly updated
Sequence and limit operation of MATLAB









