A Unicode string type of variable length, where n counts byte-pairs (1 to 4,000) and each byte-pair takes two bytes; nchar is its fixed-length counterpart, and a supplementary character needs two byte-pairs.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains nvarchar in context, with comparison tables and the common traps.
Terms in this definition
- WHERE
Limits a SELECT, UPDATE or DELETE to just the rows meeting a condition. Omit it, and the statement hits every row.
Related terms
- ISJSON
Checks a string and returns whether its contents are valid JSON. A CHECK constraint of the form CHECK (ISJSON(col) = 1) uses it to keep nvarchar columns free of malformed JSON.
- json data type
SQL's built-in type for holding JSON. It accepts well-formed objects and arrays only, parsing them and saving them as UTF-8 binary. The other choice is keeping JSON as
nvarchar(max)text. - Large value data types
The (max) types, meaning nvarchar(max), varchar(max) and varbinary(max), along with vector, json and the older image, text and ntext types. They are allowed as included columns but never as part of an index key.