• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1177
  • Last Modified:

Difference between Varchar and NVarchar ?

What is the difference between nvarchar and varchar?
0
jjacksn
Asked:
jjacksn
2 Solutions
 
xnmbCommented:
nvarchar can hold both ascii and unicode characters while varchar can only hold ascii characters. nvarchar consumes 2 bytes per character while varchar consumes only 1 byte per character.
0
 
xnmbCommented:
btw, you can easily look that up on BOL for a more  elaborate explanation.
0
 
montaleast13Commented:
Hello,

varchar stores no-unicode data. The maximum length of the data is up to 8000 characters.  nvarchar stores unicode data. The maximum length of the data is up to 4000 characters.  

Hope it helps.

montaleast13 :-)
0
 
jjacksnAuthor Commented:
BOL?
0
 
Renante EnteraSenior PHP DeveloperCommented:
Hi jjacksn!

Eventhough that you have already accepted an answer.  Perhaps, it is still useful if I post some comments in here.

You may visit the following sites for some additional information :

char and varchar - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ca-co_7tpu.asp
nchar and nvarchar - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_na-nop_9msy.asp

Hope this helps you.


Regards!
eNTRANCE2002 :-)
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now