当前位置:网站首页>What is the difference between varchar and char?
What is the difference between varchar and char?
2022-04-23 02:45:00 【Mechanical bucket running】
Difference one , Set and lengthen
char It means fixed length , Fixed length ,varchar It means longer , I.e. variable length .char If the inserted length is less than the defined length , Fill with spaces ;varchar Less than the defined length , It is still stored according to the actual length , Save as long as you insert .
Because its length is fixed ,char The access speed is still faster than varchar It's much faster , Convenient program storage and search ; however char It's also the price of space , Because its length is fixed , So it takes up extra space , It can be said that space in exchange for time efficiency .varchar On the contrary , Time for space .
The second difference , Different storage capacity
Yes char Come on , The maximum number of characters that can be stored 255, It's not about coding .
and varchar Well , Can store at most 65532 Characters .varchar The maximum effective length of is determined by the maximum line size and the character set used . The overall maximum length is 65,532 byte .
————————————————
Copyright notice : This paper is about CSDN Blogger 「 Slow ugly duckling 」 The original article of , follow CC 4.0 BY-SA Copyright agreement , For reprint, please attach the original source link and this statement .
Link to the original text :https://blog.csdn.net/qq_20264581/article/details/83755789
版权声明
本文为[Mechanical bucket running]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220745203538.html
边栏推荐
- Solve the problem that PowerShell mining occupies 100% of cpu7 in win7
- JVM类加载器
- 16、 Anomaly detection
- The usage and difference of * and & in C language and the meaning of keywords static and volatile
- 期中汇总(概论+应用层+运输层)
- Linux redis - redis ha sentinel cluster construction details & redis master-slave deployment
- 打靶narak
- 谷雨
- 【unity3D】直播间滚动式弹幕效果
- [suggestion collection] hematemesis sorting out golang interview dry goods 21 questions - hanging interviewer-1
猜你喜欢

Source code and some understanding of employee management system based on polymorphism

解决win7 中powershell挖矿占用CPU100%

Modify the content of MySQL + PHP drop-down box

能做多大的单片机项目程序开发,就代表了你的敲代码的水平

Halo open source project learning (I): project launch

Solve the problem that PowerShell mining occupies 100% of cpu7 in win7

Rhcsa day 1 operation

Fashion MNIST dataset classification training

Renesas electronic MCU RT thread development and Design Competition

机器学习(周志华) 第十四章概率图模型
随机推荐
Learn regular expression options, assertions
Machine learning (Zhou Zhihua) Chapter 14 probability graph model
Renesas electronic MCU RT thread development and Design Competition
Real math problems in 1958 college entrance examination
【Hcip】OSPF常用的6种LSA详解
学习正则表达式选项、断言
Download the genuine origin Pro 2022 tutorial and how to activate it
[unity3d] rolling barrage effect in live broadcasting room
How to prevent leakage of operation and maintenance data
Cuisine leetcode
Water diversion into chengluo Valley p1514
The 16th day of sprint to the big factory, noip popularization Group Three Kingdoms game
接口请求时间太长,jstack观察锁持有情况
JZ35 replication of complex linked list
在MySQL Workbench中执行外部的SQL脚本,报错
Servlet template engine usage example
Use of go language web Middleware
Day 3 of learning rhcsa
解决win7 中powershell挖矿占用CPU100%
The usage and difference of * and & in C language and the meaning of keywords static and volatile