varchar(50),varchar(MAX),nvarchar(100),varbinary(100)有什么区别? [英] what is the difference between varchar(50),varchar(MAX),nvarchar(100),varbinary(100)?

查看:523
本文介绍了varchar(50),varchar(MAX),nvarchar(100),varbinary(100)有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



谁能知道这一点.

varchar(50),varchar(MAX),nvarchar(100),varbinary(100)有什么区别?



Can anyone know this.

what is the difference between varchar(50),varchar(MAX),nvarchar(100),varbinary(100)?

推荐答案

Varchar不是Unicode
Nvarchar是Unicode
(大小)定义填充的最大长度
(max)将此nlength定义为该类型的最大允许值(varchar约为8000个字符)
Varbinary保存二进制数据,而不是ASCII或Unicode.

``var''位表示为fild占用的实际空间是变量,即如果将"abc"存储在varchar(100)中,则不会占用100字节的存储空间,而只会占用3个字节.
Varchar is not Unicode
Nvarchar is Unicode
(size) defines the maximum length of the filled
(max) defines thisnlengthnto be the maximum allowable for that type (about 8000 chars for varchar)
Varbinary holds binary data rather than ASCII or Unicode.

The ''var'' bit is an indication that the actual space taken up for the fild is variable I.e. if you store "abc" in a varchar(100) it doesn''t take up 100 bytes of storage , rather it takes a little over three.


varchar是排序规则敏感字符字符串(每个字符1个字节)nvarchar是Unicode字符串(每个字符2个字节)

括号中的数字是字符串的大小.

MAX是一个新关键字(在SQL 2005之后),它是一个长度不受限制的可变长度字符串.
varchar is collation sensitive character string (1 byte per character) nvarchar is a unicode string (2 bytes per character)

The number in the parenthesis is the size of the string.

MAX is a new keyword (post sql 2005) which is a variable length of unlimited size string.




Varchar不是Unicode,每个字符占用1个字节
Nvarchar是Unicode,采用2个字节的par char

Max可以使用最大大小.

VarBinary以位格式(0或1)存储值,主要用于安全性.
Hi,

Varchar is not Unicode and takes 1 byte per char
Nvarchar is Unicode and takes 2 byte par char

Max takes maximum size, it can have.

VarBinary stores value in bit format (0 or 1), it is mainly used for security.


这篇关于varchar(50),varchar(MAX),nvarchar(100),varbinary(100)有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆