Skip to main content
黑话筒

SQL Server中的NVARCHAR中的N是什么意思

查了MSDN,解决了心中疑惑。

原来NVARCHAR中的N是National的意思,也就是National VARCHAR。

N’你好’,这里的N也是National的意思,就是说让SQL Server认为这个字符串是NCHAR

VARCHAR的意思是可变长度的CHAR。

CHAR就是一个字符。

来源:

ntext

Variable-length Unicode data with a maximum string length of 2^30 - 1 (1,073,741,823) bytes. Storage size, in bytes, is two times the string length that is entered.

The ISO synonym for ntext is national text.

http://technet.microsoft.com/en-us/library/ms187993.aspx