Wednesday, September 12, 2012

Difference between varchar and nvarchar in SQL server



1. Character Data Type

  •        varchar - Non-Unicode Data
  •        nvarchar - Unicode Data

2. Character Size

  •          varchar - 1 byte
  •          nvarchar - 2 bytes

3.  Maximum Length

  •          varchar - 8,000 bytes
  •          nvarchar - 4,000 bytes

4.  Storage Size

  •          varchar - Actual Length (in bytes)
  •          nvarchar - 2 times Actual Length (in bytes)

No comments: