Difference in “varchar” and “nvarchar” in SQL Server

Author posted by Jitendra on Posted on under category Categories SQL Server and tagged as Tags with Leave a comment on Difference in “varchar” and “nvarchar” in SQL Server

What is the difference between varchar and nvarchar in MS SQL Server.

This article explains the difference between varchar and nvarchar datatype in SQL Server.

nVarchar Varchar
varchar stores UNICODE data.  Means it store UNICODE or multilingual data. Varchar Stores ASCII data
UNICODE requires 2 bytes for each character you store. This Means single row of a single nvarchar column can only be nvarchar (4000) Because because of the row size limitations of Sql Server is the same as the page size limit, which is 8060 bytes ASCII only requires 1 byte for each character.
This means a single row of a single varchar column can be varchar(8000) because of the row size limitations of Sql Server is the same as the page size limit, which is 8060 bytes

Related posts

Leave a Reply

Your email address will not be published. Required fields are marked *