Unicode Character data types

Unicode Characters data type stores data using UNICODE UCS-2 character set.
General non-Unicode character data types store the date using limited character set, where as Unicode Character data type stores all the characters using Unicode Standard.

Unicode Character data type uses double the space as that of Non-Unicode data types.
That is each character in Unicode character data type used 2 Bytes of space.

Nchar : It’s a fixed length Unicode Character data type. For a field with data type as NCHAR(N), server used 2N bytes of space.

Nvarchar:  It’s a variable length Unicode data type. For a field with data type as NVARCHAR(N) and containing M characters of data, space needed is 2M Bytes.

Both NCHAR and NVARCHAR data types can hold maximum of 4000 Unicode characters only.

Ntext: In order to hold the Unicode data which contains more than 4000 Unicode characters, NTEXT is used . NTEXT database can hold up to 2^30 – 1 = 1,073,741,823 bytes of data.

This entry was posted in . Bookmark the permalink.

Leave a reply