I came across a question while buidling schema for my application.
When to use varchar(max)
and nvarchar(max)
. I mean the exact use cases where it should be applied. I have surfed in net too but I was able to get the exact answer.
Could anyone suggest some exact usecase.
This is for Microsoft SQL Server:
NVARCHAR
is Unicode - 2 bytes per character, therefore max. of 1 billion characters; will handle East Asian, Arabic, Hebrew, Cyrillic etc. characters just fine.VARCHAR
is non-Unicode - 1 byte per character, max. capacity is 2 billion characters, but limited to the character set you're SQL Server is using, basically - no support for those languages mentioned before