当前位置:网站首页>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.
边栏推荐
- "Sequelae" of the withdrawal of community group purchase from the city
- 【C 题集】of Ⅷ
- 市值蒸发超百亿美元,“全球IoT云平台第一股”赴港求生
- Fr exercise topic --- comprehensive question
- Can I pass the PMP Exam in 20 days?
- 爱可可AI前沿推介(7.5)
- CPU设计实战-第四章实践任务二用阻塞技术解决相关引发的冲突
- STM32+BH1750光敏传感器获取光照强度
- [C question set] of Ⅷ
- 浅谈Dataset和Dataloader在加载数据时如何调用到__getitem__()函数
猜你喜欢

Ecotone technology has passed ISO27001 and iso21434 safety management system certification

【jvm】运算指令

Fr exercise topic --- comprehensive question

Mysql---- function

Visual task scheduling & drag and drop | scalph data integration based on Apache seatunnel
![P6183 [USACO10MAR] The Rock Game S](/img/f4/d8c8763c27385d759d117b515fbf0f.png)
P6183 [USACO10MAR] The Rock Game S

一键更改多个文件名字

Run faster with go: use golang to serve machine learning

MySQL之CRUD

华为哈勃化身硬科技IPO收割机
随机推荐
Change multiple file names with one click
华为哈勃化身硬科技IPO收割机
我这边同时采集多个oracle表,采集一会以后,会报oracle的oga内存超出,大家有没有遇到的?
当代人的水焦虑:好水究竟在哪里?
Common redis data types and application scenarios
MySQL----函数
Common interview questions about swoole
R 熵权法计算权重及综合得分
Leetcode: Shortest Word Distance II
[12 classic written questions of array and advanced pointer] these questions meet all your illusions about array and pointer, come on!
计算中间件 Apache Linkis参数解读
ICML 2022 | 探索语言模型的最佳架构和训练方法
Ctfshow web entry information collection
Implement a blog system -- using template engine technology
Redis distributed lock principle and its implementation with PHP (1)
Common MySQL interview questions (1) (written MySQL interview questions)
[JVM] operation instruction
Differences between IPv6 and IPv4 three departments including the office of network information technology promote IPv6 scale deployment
JMeter performance test: serveragent resource monitoring
Detailed explanation of usememo, memo, useref and other relevant hooks