当前位置:网站首页>今天和大家聊一聊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 更高
边栏推荐
- Analysis of the internal principle of LinkedList
- PlatoFarm几大创新经济模型,给予当下元宇宙市场的启发
- SeekTiger生态通证STI 新进展,4月14日登录 ZB
- 居家健康诊断时代下,Senzo打造增强侧向流测试产品
- 数据库高级技术学习笔记1--Oracle部署和PL/SQL综述
- [Guangxi University] information sharing of postgraduate entrance examination and re examination
- 软件测试与质量学习笔记2----黑盒测试
- C# 倒计时工具
- Translation recommendation | debugging bookkeeper protocol - unbounded ledger
- ARouter源码解析(一)
猜你喜欢

Seeing clearly is more important than walking fast, because you can go far only when you walk right

ECCV 2022 | 无需微调即可推广!基于配准的少样本异常检测框架

多线程一定能优化程序性能吗?

Salted fish esp32 instance - mqtt lit LED

Basic operation of MATLAB

刚获融资的Espresso Systems,知识产权与团队道德双双陷入困境

《我的Vivado实战—单周期CPU指令分析》

Opencv4.60 installation and configuration

pycharm使用conda调用远程服务器

ECCV 2022 | can be promoted without fine adjustment! Registration based anomaly detection framework for small samples
随机推荐
With such a simple verification, 80% of programmers can't do it, let alone understand it!
ECCV 2022 | 无需微调即可推广!基于配准的少样本异常检测框架
Pulse style | exclusive interview with Committee -- Tencent engineer Zhang Dawei calls you to eat "crab"
MATLAB的实时编辑器
ThresholdFilter简介说明
Window源码解析(二):Window的添加机制
SizeBasedTriggeringPolicy简介说明
MySQL中各类型文件详解
数据库高级学习笔记--存储结构
OSS直连上传-Rails服务实践
[log] what does a log do? What is a log factory? Configuration and use of log4j? log4j. Properties file configuration, log4j jar package coordinates
fastjson中@jsonType注解的功能简介说明
Window源码解析(三):Window的更新机制
Express builds a simple local background (1)
LeetCode - 哈希表专题
go语言切片Slice和数组Array对比panic runtime error index out of range问题解决
Analysis of the internal principle of LinkedList
Business visualization - make your flowchart'run'(4. Actual business scenario test)
译文推荐 | 调试 BookKeeper 协议 - 无界 Ledger
Window源码解析(四):Window的删除机制