Is it just that nvarchar
supports multibyte characters? If that is the case, is there really any point, other than storage concerns, to using varchars
I have to say here (I realise that I'm probably going to open myself up to a slating!), but surely the only time when NVARCHAR
is actually more useful (notice the more there!) than VARCHAR
is when all of the collations on all of the dependant systems and within the database itself are the same...? If not then collation conversion has to happen anyway and so makes VARCHAR
just as viable as NVARCHAR
.
To add to this, some database systems, such as SQL Server (before 2012) have a page size of approx. 8K. So, if you're looking at storing searchable data not held in something like a TEXT
or NTEXT
field then VARCHAR
provides the full 8k's worth of space whereas NVARCHAR
only provides 4k (double the bytes, double the space).
I suppose, to summarise, the use of either is dependent on: