当前位置:网站首页>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.
边栏推荐
- 在Pytorch中使用Tensorboard可视化训练过程
- Using tensorboard to visualize the training process in pytoch
- webRTC SDP mslabel lable
- Common interview questions about swoole
- 浅谈Dataset和Dataloader在加载数据时如何调用到__getitem__()函数
- 你童年的快乐,都是被它承包了
- 【数组和进阶指针经典笔试题12道】这些题,满足你对数组和指针的所有幻想,come on !
- 可视化任务编排&拖拉拽 | Scaleph 基于 Apache SeaTunnel的数据集成
- CODING DevSecOps 助力金融企业跑出数字加速度
- Common MySQL interview questions
猜你喜欢
Photoshop plug-in action related concepts actionlist actiondescriptor actionlist action execution load call delete PS plug-in development
How to paste the contents copied by the computer into mobaxterm? How to copy and paste
Your childhood happiness was contracted by it
Drive brushless DC motor based on Ti drv10970
安装配置Jenkins
[detailed explanation of Huawei machine test] character statistics and rearrangement
P6183 [USACO10MAR] The Rock Game S
CODING DevSecOps 助力金融企业跑出数字加速度
Redis' transaction mechanism
Garbage collection mechanism of PHP (theoretical questions of PHP interview)
随机推荐
Crud de MySQL
Reconnaissance des caractères easycr
可转债打新在哪里操作开户是更安全可靠的呢
漫画:优秀的程序员具备哪些属性?
你童年的快乐,都是被它承包了
Shanghai under layoffs
Detailed explanation of QT creator breakpoint debugger
Common MySQL interview questions (1) (written MySQL interview questions)
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?
Differences between IPv6 and IPv4 three departments including the office of network information technology promote IPv6 scale deployment
[recruitment position] Software Engineer (full stack) - public safety direction
Using tensorboard to visualize the training process in pytoch
通过npm 或者 yarn安装依赖时 报错 出现乱码解决方式
sql server char nchar varchar和nvarchar的区别
Leetcode: Shortest Word Distance II
Drive brushless DC motor based on Ti drv10970
PHP high concurrency and large traffic solution (PHP interview theory question)
Au - delà du PARM! La maîtrise de l'Université de Pékin propose diverse pour actualiser complètement le classement du raisonnement du NLP
Stm32+bh1750 photosensitive sensor obtains light intensity
Ten billion massage machine blue ocean, difficult to be a giant