Advertisement
Beginner SQL Server, Data Types & Schema Design

What is the difference between VARCHAR and NVARCHAR, and when should you choose one over the other?

Short answer

VARCHAR stores regular text using one byte per character and is sufficient for languages using the standard English alphabet, while NVARCHAR stores Unicode text using two bytes per character, supporting a much wider range of international characters and symbols, which is…

Save SQL Server mock interview
Advertisement
AModel answer
VARCHAR stores regular text using one byte per character and is sufficient for languages using the standard English alphabet, while NVARCHAR stores Unicode text using two bytes per character, supporting a much wider range of international characters and symbols, which is necessary for applications that need to support multiple languages.
CREATE TABLE Customers (
  Name NVARCHAR(100),
  Country VARCHAR(50)
);
Real-world example
An international e-commerce platform uses NVARCHAR for customer names to properly support customers from many different countries whose names include characters outside the basic English alphabet.
Likely follow-ups
  • Does using NVARCHAR instead of VARCHAR significantly increase storage requirements?
  • Should every text column default to NVARCHAR just to be safe?
Related topics