NCHAR is a fixed-length Unicode character data type. This topic describes the syntax, parameters, and usage of the NCHAR data type.
Syntax
NCHAR[(size)]
Parameters
| Parameter | Description |
|---|---|
size |
The maximum length of the fixed-length character data, which is defined by the national character set. The maximum length is 2000 bytes. The minimum length of the fixed-length character data is 1 character by default. |
Considerations
When you create a database, the maximum length of a column is defined by the national character set. When you create a table that contains a column of the NCHAR data type, you define the column length in terms of characters. The width of the NCHAR data type is specified in terms of characters. The maximum column size is 2000 bytes.
If you want to store Chinese characters in less space, you can use the NCHAR data type.
When you store data in the NCHAR data type, the database automatically pads the data with spaces if the stored data is shorter than the specified length. You can specify the length in terms of characters only.
