Was this helpful?
Long Nvarchar Data Type
The long nvarchar data type has the same characteristics as the nvarchar data type, but can accommodate strings up to 2 GB in length. Do not declare a length for long nvarchar columns. In embedded SQL data handlers can be created, which are routines to read and write the data for long nvarchar (and long byte) columns. For details about data handlers, see Data Handlers for Large Objects in the “Embedded SQL” chapter, and the Embedded SQL Companion Guide.
Restrictions on Long Nvarchar Columns
The following restrictions apply to long nvarchar columns:
They cannot be part of a table key.
They do not declare a length.
They cannot be part of a secondary index.
They cannot be used in the order by group, or by clause in a select statement.
They cannot have query optimization statistics. For details about query optimization statistics, see the discussion of the optimizedb utility in the Command Reference Guide.
The following string functions do not work with long nvarchar columns:
Locate
Pad
Shift
Squeeze
Trim
Notrim
Charextract
These columns cannot be directly compared to other string data types. To compare a long nvarchar column to another string data type, apply a coercion function.
A string literal of more than 1000 characters cannot be assigned to a long nvarchar column. Details about assigning long strings to these columns are found in the description of data handlers in the Embedded SQL Companion Guide or the OpenAPI User Guide.
Last modified date: 12/14/2023