{ NATIONAL CHARCTER | NATIONAL CHAR | NCHAR } [ VARYING ][(length) ]
The data type of the NCHAR type column is as follows:
Data type specification format | Explanation |
---|---|
NATIONAL CHARACTER(n) NATIONAL CHAR(n) NCHAR(n) | National character string with a fixed length of n characters This will be the same as (1) if (n) is omitted. n is a whole number larger than 0. |
NATIONAL CHARACTER VARYING(n) NATIONAL CHAR VARYING(n) NCHAR VARYING(n) | National character string with a variable length with a maximum of n characters Any length of national character string can be accepted when this is omitted. n is a whole number larger than 0. |
NCHAR is the national character string type data type. The length is the number of characters.
The length of the national character string type is as follows:
When VARYING is not specified, the length of national character strings is fixed and will be the specified length.
When VARYING is specified, the length of national character strings will be variable.
In this case, the lower limit will be 0 and the upper limit will be the value specified for length.
NATIONAL CHARACTER, NATIONAL CHAR, and NCHAR each have the same meaning.
When the national character string to be stored is shorter than the declared upper limit, the NCHAR value is filled with spaces, whereas NCHAR VARYING is stored as is.
The upper limit for character storage is approximately 1GB.