varchar (n), n in nvarchar (n) how to interpret:
nvarchar (n) can store up to n characters without distinguishing between Chinese and English.
varchar (n) can store up to n bytes , and one Chinese is two bytes.
Occupied space:
nvarchar (n) is a character that takes up two bytes of space.
varchar (n) Chinese accounts for two bytes of space in English.
Value range of N:
The range of nvarchar (n) n is: between 1 and 4000
The range of varchar (n) n is: between 1 and 8000
Whether the size of n affects performance:
The length n in varchar and nvarchar does not affect space size and performance. Unless N is max and the content is greater than 4000 or 8000
Set N More is the business needs, such as restricting the ID card can only enter 18 digits, then more error, or prevent malicious attacks to support the hard drive. No impact on space or performance
varchar (n), nvarchar (n) Description of length, performance, and space occupied