DIFFERENCE BETWEEN VARCHAR AND NVARCHAR DATA TYPE IN SQL SERVER 2005

Similarities & Differences.

1.Both are variable length.

2.Character data type of varchar(n) is non unicode where as Nvarchar(n) has unicode character data type.

3.Maximum length of varchar(n) is 8000.

4.Maximum length of Nvarchar is 4000.

5.Character size is 1 byte in case of varchar(n) but in case of Nvarchar it is 2 bytes.

6.Storage size is actual length in varchar(n) in bytes where as it is 2 times actual length in bytes.

Pawan Kumar
Pawankkmr@hotmail.com

Advertisements