x

Difference between char and nvarchar / char and varchar data-type?

Sunday, December 23, 20120 comments


char[(n)] -
 Fixed-length non-Unicode character data with length of n bytes. n must be a value from 1 through 8,000. Storage size is n bytes. The SQL-92 synonym for char is character.

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 bytes. n must be a value from 1 through 8,000. Storage size is the actual length in bytes 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. 

Share this article :

Post a Comment

 
Copyright © 2010. SharePointDotNet.com - All Rights Reserved
Template Created by Creating Website Published by Mas Template