VARCHAR and NVARCHAR are string data types of variable length in a SQL Server database.
VARCHAR
The data type NVARCHAR is used to store variable-length non-Unicode string data.
The syntax:
varchar [ ( n | max ) ]
n defines the string length and can be a value from 1 through 8,000. max indicates that the maximum storage size is 2^31-1 bytes (2 GB). The storage size is the actual length of the data entered + 2 bytes. The ISO synonyms for varchar are char varying or character varying.
NVARCHAR
The data type NVARCHAR is used to store variable-length Unicode string data.
The syntax:
nvarchar [ ( n | max ) ]
n defines the string length and can be a value from 1 through 4,000. max indicates that the maximum storage size is 2^31-1 bytes (2 GB). The storage size, in bytes, is two times the actual length of data entered + 2 bytes. The ISO synonyms for nvarchar are national char varying and national character varying.
Which One Should Be Used?
In general, you should use NVARCHAR data type to define string data column or variable if you know that the data to be stored in the column or variable can have Unicode characters.
All modern operating systems and development platforms use Unicode internally. By using nvarchar rather than varchar, you can avoid doing encoding conversions every time you read from or write to the database. Conversions take time, and are prone to errors. And recovery from conversion errors is a non-trivial problem.