当前位置:网站首页>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.
边栏推荐
- MySQL----函数
- GPS original coordinates to Baidu map coordinates (pure C code)
- How to solve the problem of garbled code when installing dependency through NPM or yarn
- 面试突击62:group by 有哪些注意事项?
- 【C 题集】of Ⅷ
- MySQL之CRUD
- Stm32+bh1750 photosensitive sensor obtains light intensity
- 计算中间件 Apache Linkis参数解读
- Coding devsecops helps financial enterprises run out of digital acceleration
- 可视化任务编排&拖拉拽 | Scaleph 基于 Apache SeaTunnel的数据集成
猜你喜欢

超越PaLM!北大硕士提出DiVeRSe,全面刷新NLP推理排行榜

Machine learning notes - gray wolf optimization

Drive brushless DC motor based on Ti drv10970

Photoshop plug-in action related concepts actionlist actiondescriptor actionlist action execution load call delete PS plug-in development

Ctfshow web entry explosion

No one consults when doing research and does not communicate with students. UNC assistant professor has a two-year history of teaching struggle

Visual task scheduling & drag and drop | scalph data integration based on Apache seatunnel

Super wow fast row, you are worth learning!

你童年的快乐,都是被它承包了

729. 我的日程安排表 I :「模拟」&「线段树(动态开点)」&「分块 + 位运算(分桶)」
随机推荐
Ecotone technology has passed ISO27001 and iso21434 safety management system certification
Ten billion massage machine blue ocean, difficult to be a giant
【jvm】运算指令
[C question set] of Ⅷ
MySQL----函数
No one consults when doing research and does not communicate with students. UNC assistant professor has a two-year history of teaching struggle
漫画:程序员不是修电脑的!
Interview shock 62: what are the precautions for group by?
qt creater断点调试程序详解
Common redis data types and application scenarios
Ctfshow web entry command execution
Calculate weight and comprehensive score by R entropy weight method
What are the domestic formal futures company platforms in 2022? How about founder metaphase? Is it safe and reliable?
30岁汇源,要换新主人了
js亮瞎你眼的日期选择器
Detailed explanation of QT creator breakpoint debugger
The elimination strategy of redis
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?
PyTorch二分类时BCELoss,CrossEntropyLoss,Sigmoid等的选择和使用
How can I quickly check whether there is an error after FreeSurfer runs Recon all—— Core command tail redirection