Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is the difference from varchar... 2

Status
Not open for further replies.

edgarasm

Programmer
Oct 29, 2002
26
BR
Hi,

what is the difference from varchar to nvarchar and text to ntext beyond length? What situation should I use one or another?


thanks very much for any explanation!

regards

 
"char is a character in a given server dependent character set, nchar is a unicode character. If you want to support multiple languages/character sets, nchar/nvarchar is the way to go."
(above googled)

As I understand it, the unicode character coding takes up more room (so in SQL Server you can store half the amount of characters (max) in nchar compared to char), but can represent a lot more characters - such as arabic/chinese symbols.

This MSDN page covers it quite well:

char encoding has 256 different characters it can represent, nchar uses twice the space but can represent 65,536 different characters. :)


Posting code? Wrap it with code tags: [ignore]
Code:
[/ignore][code]CodeHere
[ignore][/code][/ignore].
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top