Nvarchar or varchar
which is the best varchar or nvarchar, and what is the benefits of each?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jan 16, 2015, 1:54 AM EST
The difference between them is that nvarchar stores unicode data (2 bytes per character) and varchar stores non-unicode data, typically ANSI (1 byte per character) though other single byte code pages can be used as well.
So, if you don't need characters outside the ANSI range (0 to 255), then using varchar will save memory.
However, there is a view nowadays that, with memory and disk storage being cheap, you should always use unicode character types despite the memory hit.
This view is evidently espoused by the .NET designers as the string type always uses unicode.
Murugesh P85 reputationPosted Jan 16, 2015, 1:58 AM EST
http://stackoverflow.com/questions/144283/what-is-the-difference-between-varchar-and-nvarchar
Pradeep ShetRank #595 · 4K reputationPosted Jan 18, 2015, 2:40 AM EST
Find the link below for difference between the char, varchar, nchar, nvarchar
I have written small article for it
http://www.c-sharpcorner.com/UploadFile/cda5ba/difference-between-char-nchar-varchar-and-nvarchar-data-ty/