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

Configuration and compilation of mingw-w64, msys and ffmpeg

深度学习系列47:超分模型Real-ESRGAN
![Don't look for [12 super easy-to-use Google plug-ins are here] (are you sure you want to take a look?)](/img/45/3e43faf7aba6741825ccb9719b8445.png)
Don't look for [12 super easy-to-use Google plug-ins are here] (are you sure you want to take a look?)

【***数组***】

How to migrate virtual machines from VirtualBox to hype-v

SSTable详解

Akamai-1.75版本-_abck参数生成-js逆向分析

TensorFlow中的数据类型

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

Learning and using quartz scheduling framework
随机推荐
【2022毕业季】从毕业到转入职场
Specific help of OSI layered model to work
System permission program cannot access SD card
898. subarray bitwise OR operation
Flannel 工作原理
【AI实战】xgb.XGBRegressor之多回归MultiOutputRegressor调参2(GPU训练模型)
[shell] tree command
产品-Axure9(英文版),原型设计后台动态二级菜单显示内容
303. 区域和检索 - 数组不可变
Regular expression graph and text ultra detailed summary without rote memorization (Part 1)
896. monotonic sequence
313. 超级丑数
Page embedded iframe click browser back problem
js 判断两个数组增加和减少的元素
901. 股票价格跨度
Why can't the index of JS array use negative numbers
309. the best time to buy and sell stocks includes the freezing period
How to migrate virtual machines from VirtualBox to hype-v
TP6 安装拓展
deeplab v3 代码结构图