NCHAR is a fixed-length UNICODE data type. This topic describes the syntax, parameters, and considerations of the NCHAR data type.
Syntax
NCHAR[(size)]
Parameters
| Parameter | Description |
|---|---|
size |
The length of fixed-length data. The maximum size is determined by the national character set definition, with an upper limit of 2,000 bytes. The default and minimum length is 1 character. |
Considerations
The maximum column length is determined by the national character set that you specify when you create the database. When you create a table that contains an NCHAR column, define the column length in characters. The width of an NCHAR value refers to the number of characters. The maximum column size allowed is 2,000 bytes.
To store Chinese characters in less space, you can choose the NCHAR data type.
To use the NCHAR data type to store data that is shorter than the specified length, the database automatically pads with spaces to the specified length. Use the CHAR keyword to specify the length in characters. You cannot manually specify another unit.