NVARCHAR is a data type in SQL that is used to store variable-length, Unicode string data. It is well-suited for storing extended character set data, such as Kanji, and can store up to 4,000 Unicode characters of data. The syntax of NVARCHAR is NVARCHAR(n), where n defines the string length that ranges from 1 to 4,000. If you don’t specify the string length, its default value is 1. Another way to declare an NVARCHAR column is to use the syntax NVARCHAR(max), which is used when the sizes of the column data entries vary considerably, and the string length might exceed 4,000 byte-pairs. The storage size of NVARCHAR is twice the actual length in bytes.
The NVARCHAR data type is used when there is variability in the length of the data. It is a superset of the VARCHAR data type, which is restricted to an 8-bit codepage. NVARCHAR can store any Unicode data, while VARCHAR is limited to a specific codepage. The main reason for preferring NVARCHAR over VARCHAR would be internationalization, i.e., storing strings in other languages. If youre going to store multilingual data in a data column, you need the NVARCHAR variant.