当前位置:网站首页>char和varchar区别
char和varchar区别
2022-06-23 06:28:00 【超级码里喵】
char是一种固定长度的类型,无论储存的数据有多少都会固定长度,如果插入的长度小于定义长度,则可以用空格进行填充。而varchar是一种可变长度的类型,当插入的长度小于定义长度时,插入多长就存多长。
char和varchar区别
1、最大长度:
char最大长度是255字符,varchar最大长度是65535个字节。
2、定长:
char是定长的,不足的部分用隐藏空格填充,varchar是不定长的。
3、空间使用:
char会浪费空间,varchar会更加节省空间。
4、查找效率:
char查找效率会很高,varchar查找效率会更低。
5、尾部空格:
char插入时可省略,varchar插入时不会省略,查找时省略。
边栏推荐
- 100 GIS practical application cases (79) - key points of making multi plan integrated base map
- 20220620 uniformly completely observable (UCO)
- Nacos适配oracle11g-建表ddl语句
- 896. 单调数列
- 900. RLE 迭代器
- [system] right click the desktop icon. After turning around, the Explorer will crash and the desktop will be refreshed
- 产品-Axure9(英文版),原型设计后台动态二级菜单显示内容
- GINet
- npm下载报错npm ERR code ERESOLVE
- Project_ Filter to solve Chinese garbled code
猜你喜欢

In depth learning series 46: face image super score gfp-gan

Advanced drawing skills of Excel lecture 100 (VIII) -excel drawing WiFi diagram

Vs2013 ffmpeg environment configuration and common error handling

GINet

U-Net: Convolutional Networks for Biomedical Image Segmentation

deeplab v3 代码结构图

QT designer cannot modify the window size, and cannot change the size by dragging the window with the mouse

别找了诸位 【十二款超级好用的谷歌插件都在这】(确定不来看看?)

深度学习系列47:超分模型Real-ESRGAN

100 GIS practical application cases (79) - key points of making multi plan integrated base map
随机推荐
excel高级绘图技巧100讲(八)-Excel绘制WIFI图
初始化层实现
A small method of debugging equipment serial port information with ADB
Flannel 工作原理
深度学习系列47:styleGAN总结
MYSQL牛客刷题
About SQL: is there a way to fill in the null value in the field without adding fields on the basis of the original fields
别找了诸位 【十二款超级好用的谷歌插件都在这】(确定不来看看?)
TP6+Redis+think-queue+Supervisor实现进程常驻消息队列/job任务
Summarized benefits
Spock-sub打桩
899. 有序队列
MySQL(五) — 锁及事务
QT designer cannot modify the window size, and cannot change the size by dragging the window with the mouse
Page embedded iframe click browser back problem
云原生落地进入深水区,博云容器云产品族释放四大价值
【AI实战】XGBRegressor模型加速训练,使用GPU秒级训练XGBRegressor
技术文章写作指南
303. region and retrieval - array immutable
宝塔忘记密码