Monday, 1 December 2014

Difference between Varchar and NVarchar in SQL Server.


-:Difference between Varchar and NVarchar in SQL Server.:-




The data type Varchar and NVarchar are the sql server data types, both will used to store the string values.

Differences :

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:

Post a Comment