Diffrence Between Varchar and NVarChar

I was just wondering what the diffrences are between NVARCHAR and VARCHAR? When do I use NVARCHAR as opposed to VARCHAR?

Thanks,
Matthew

[150 byte] By [Mulktide] at [2008-2-5]
# 1
Hi Matthew,

nvarchar is for unicode strings and varchar for non-unicode strings.

HTH,
SvenC

SvenC at 2007-9-9 > top of Msdn Tech,SQL Server,SQL Server Tools General...
# 2
Unicode (nvarchar) has the capability to store characters from all languages, while varchar typically uses a local code page and can only use local characters.

SQL Server uses 2 bytes per character for n-type text columns, while the not-n-type columns use 1 (at least for latin-based languages).

Most of the time, nvarchar/nchar/ntext is the way to go.

-Ryan / Kardax

RyanLamansky at 2007-9-9 > top of Msdn Tech,SQL Server,SQL Server Tools General...

SQL Server

Site Classified