当前位置:网站首页>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插入时不会省略,查找时省略。
边栏推荐
猜你喜欢

Quartz调度框架的学习使用

TensorFlow中的数据类型

Xiaobai must see in investment and wealth management: illustrated fund buying and selling rules

20220621 Dual Quaternion

Unet代码实现

Eureka

Flannel 工作原理

Traversal of binary tree and related knowledge

407 stack and queue (232. implementing queue with stack, 225. implementing stack with queue)

Deeplab V3 code structure diagram
随机推荐
Deeplab V3 code structure diagram
Configuration and compilation of mingw-w64, msys and ffmpeg
In depth learning series 47:stylegan summary
295. median data flow
云原生落地进入深水区,博云容器云产品族释放四大价值
闫氏DP分析法
Endnote20 tutorial sharing (unfinished
897. 递增顺序搜索树
901. stock price span
MySQL总结
309. the best time to buy and sell stocks includes the freezing period
The List
Vs2013 ffmpeg environment configuration and common error handling
asp. Net file download demo and related problems
Xiaobai must see in investment and wealth management: illustrated fund buying and selling rules
Specific help of OSI layered model to work
deeplab v3 代码结构图
Why can't the index of JS array use negative numbers
GIS实战应用案例100篇(七十九)-多规整合底图的制作要点
A small method of debugging equipment serial port information with ADB