当前位置:网站首页>The difference between SQL Server char nchar varchar and nvarchar
The difference between SQL Server char nchar varchar and nvarchar
2022-07-05 15:09:00 【Blue sky ⊙ white clouds】
- char: Fixed length ,
Storage ansi character, Fill in the blanks . - nchar: Fixed length ,
Storage Unicode character, Fill in the blanks . - varchar(n): The length is n Bytes of
Variable length and not Unicode Character data of.n It has to be between 1 and 8,000 Value between . The storage size is the actual length of the bytes of the input data , instead of n Bytes . - nvarchar(n): contain n A character
Variable length Unicode Character data.n The value of must be between 1 And 4,000 Between . The storage size of a byte is twice the number of characters entered . - TEXT
text Store variable lengthNot Unicode data, Maximum length is 2^31-1(2,147,483,647) Characters . - NCHAR、NVARCHAR、NTEXT
These three are more than the first three in terms of names "N". and char、varchar Compare ,nchar、nvarchar Maximum storage 4000 Characters , Whether in English or Chinese ; and char、varchar It can store at most 8000 English ,4000 The Chinese characters . It can be seen thatUse nchar、nvarchar Don't worry about whether the input character is English or Chinese , More convenient, But there is some loss in the amount of English stored .
So generally speaking , If it contains Chinese characters , use nchar/nvarchar, If it's pure English and numbers , use char/varchar.
边栏推荐
- CPU design practice - Chapter 4 practical task 2 using blocking technology to solve conflicts caused by related problems
- DVWA range clearance tutorial
- Creation and use of thymeleaf template
- 两个BI开发,3000多张报表?如何做的到?
- Un week - end heureux
- Calculate weight and comprehensive score by R entropy weight method
- mapper.xml文件中的注释
- Talk about your understanding of microservices (PHP interview theory question)
- [12 classic written questions of array and advanced pointer] these questions meet all your illusions about array and pointer, come on!
- Machine learning notes - gray wolf optimization
猜你喜欢

Garbage collection mechanism of PHP (theoretical questions of PHP interview)

美团优选管理层变动:老将刘薇调岗,前阿里高管加盟

IPv6与IPv4的区别 网信办等三部推进IPv6规模部署

729. 我的日程安排表 I :「模拟」&「线段树(动态开点)」&「分块 + 位运算(分桶)」

Dark horse programmer - software testing -10 stage 2-linux and database -44-57 why learn database, description of database classification relational database, description of Navicat operation data, de

Reasons and solutions for redis cache penetration and cache avalanche

30岁汇源,要换新主人了

浅谈Dataset和Dataloader在加载数据时如何调用到__getitem__()函数

一键更改多个文件名字

基于TI DRV10970驱动直流无刷电机
随机推荐
JS bright blind your eyes date selector
Creation and optimization of MySQL index
js亮瞎你眼的日期选择器
想问下大家伙,有无是从腾讯云MYSQL同步到其他地方的呀?腾讯云MySQL存到COS上的binlog
sql server学习笔记
1330: [example 8.3] minimum steps
[C question set] of Ⅷ
anaconda使用中科大源
R 熵权法计算权重及综合得分
Redis' transaction mechanism
PHP high concurrency and large traffic solution (PHP interview theory question)
GPS original coordinates to Baidu map coordinates (pure C code)
CPU design practice - Chapter 4 practical task 2 using blocking technology to solve conflicts caused by related problems
Does maxcompute have SQL that can query the current storage capacity (KB) of the table?
Jmeter性能测试:ServerAgent资源监控
I collect multiple Oracle tables at the same time. After collecting for a while, I will report that Oracle's OGA memory is exceeded. Have you encountered it?
Machine learning notes - gray wolf optimization
Your childhood happiness was contracted by it
CODING DevSecOps 助力金融企业跑出数字加速度
qt creater断点调试程序详解