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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nvarchar vs varchar

Status
Not open for further replies.

Kinl

Programmer
Mar 19, 2001
168
0
0
US
My main question is: .. .what is the difference in the two?

Is one better than the other? Can anyone give me any examples??

Thanx for any help!

kinl
 
nchar, nvarchar, ntext are the unicode equivalent of their counterparts. The unicode is a 2 byte character instead of 1 byte character found in latin based languages. The use depends on which languages you are programming for.

nvarchar(n)
Variable-length Unicode character data of n characters. n must be a value from 1 through 4,000. Storage size, in bytes, is two times the number of characters entered. The data entered can be 0 characters in length. The SQL-92 synonyms for nvarchar are national char varying and national character varying.

varchar[(n)]
Variable-length non-Unicode character data with length of n characters. n must be a value from 1 through 8,000. Storage size is the actual length of the data entered, not n bytes. The data entered can be 0 characters in length. The SQL-92 synonyms for varchar are char varying or character varying.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top