Unicode Data

Traditional, non-Unicode data types in Microsoft® SQL Server™ allow the use of characters that are defined by a particular character set. A character set is chosen during SQL Server Setup and is immutable throughout the lifetime of the installation. Using Unicode data types, a column can store any character that is defined by the Unicode Standard, which includes all of the characters that are defined in the various character sets. Unicode data types take twice as much storage space as non-Unicode data types.

Unicode data is stored using the nchar, nvarchar, and ntext data types in SQL Server. Use these data types for columns that store characters from more than one character set. Use nvarchar when a column’s entries vary in the number of Unicode characters (up to 4,000) they contain. Use nchar when every entry for a column has the same fixed length (up to 4,000 Unicode characters). Use ntext when any entry for a column is longer than 4,000 Unicode characters.


Note The SQL Server Unicode data types are based on the National Character data types in the SQL-92 standard. SQL-92 uses the prefix character n to identify these data types and values.


See Also
nchar and nvarchar Unicode Standard
ntext, text, and image Using Unicode Data

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.