May 18, 2015

The main difference between nvarchar and varchar column is in the character set of data that it can store. Varchar is single byte whereas nvarchar is double-byte and therefore nvarchar can store Unicode characters while varchar cannot.

We might start to think that varchar is a better option than nvarchar as it takes less space. Well though it varchar takes less space, it's not worth going through the code-page incompatibilities which can lead to data errors eventually.

Also, nvarchar might have some performance improvement compared to varchat as modern operating system use Unicode internally and performs conversion to different codepages as needed. Therefore, having varchar can theoretically cause conversion issues.

0 comments:

Reference: Shahed Kazi at AspNetify.com