NVARCHAR2 is a UNICODE data type. This topic describes the syntax, parameters, and considerations of the NVARCHAR2 data type.
Syntax
NVARCHAR2(size)
Parameters
| Parameter | Description |
|---|---|
| size | The column length, which is variable. It specifies the number of characters, which cannot exceed 32,767 bytes. You must specify the size parameter for a NVARCHAR2 column. The number of bytes can be up to two times the specified size for AL16UTF16 encoding and three times the specified size for UTF8 encoding. The byte size is determined by the national character set definition, with an upper limit of 32,767 bytes. |
Considerations
The column size of the NVARCHAR2 data type is variable. The maximum size is 32,767 bytes, and the minimum size is 1 byte. When you create a table that contains a column of the NVARCHAR2 data type, you must specify the maximum number of characters allowed for NVARCHAR2. The default value is in the unit of CHAR. Other units are not allowed.
If you are not sure about the length of the stored data and the data may contain Chinese characters, you can choose the NVARCHAR2 type.