Collate NVARCHAR data

The NVARCHAR data type is a locale-sensitive data type. The only difference between NVARCHAR and VARCHAR data types is the collation order, except in databases that were created with the NLSCASE INSENSITIVE property.

The database server collates data in NVARCHAR columns in localized order, if the database locale defines a localized order. In contrast, the database server collates data in VARCHAR columns in code-set order for most operations, even if the database locale (or the SET COLLATION statement of SQL) defines a localized collation.

Because the default locale (U.S. English) has no localized order, the database server sorts NVARCHAR data in code-set order in the default locale, just as it sorts VARCHAR data.

Important: In an NLSCASE INSENSITIVE database, strings of all character data types are stored with the same uppercase or lowercase letters as in the records that were loaded or inserted into the database tables. Database server operations on NVARCHAR and NCHAR character strings, however, ignore the case of letters, ordering their data values during collation without respect to or preference for case. Thus, the NVARCHAR string "VC" might precede or follow "vc" or "Vc" in a collated list, depending on the order in which the data values are retrieved.