All Products
Search
Document Center

NVARCHAR2 data type

Last Updated: Jun 18, 2021

The NVARCHAR2 data type stores UNICODE characters. An NVARCHAR2 column stores variable-length values. The maximum length of an NVARCHAR2 column is 32,767 bytes. The minimum length of an NVARCHAR2 column is 1 byte. When you create a table that contains an NVARCHAR2 column, you must specify the maximum number of characters that a value in the NVARCHAR2 column can contain. By default, CHAR is the unit that is used to measure the column length. You cannot specify other units.

If the values to be stored have uncertain lengths, you can choose the NVARCHAR2 type.

Format

NVARCHAR2(size)

Parameters

Parameter

Description

size

A variable column length. You must specify the size of NVARCHAR2. The number of bytes can be up to two times the specified size if AL16UTF16 encoding is used and three times the specified size if UTF8 encoding is used. The national character set defines the number of bytes. The upper limit is 32,767 bytes.