Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

NATIONAL CHARACTER - Strings with a fixed length

The data type NATIONAL CHARACTER or NCHAR is used for columns which can contain fixed-length national values (see the section "National literals").



[ {[ dimension ] | ( dimension )] } { NATIONAL CHAR[ACTER] | NCHAR } [ ( cu_length [CODE_UNITS])]



dimension

Unsigned integer between 1 and 255. The column is a multiple column; dimension indicates the number of column elements. dimension can be enclosed in square brackets or parentheses.

Any square brackets shown here in italics are special characters, and must be specified in the statement.

dimension omitted:
The column is an atomic column.

cu_length

Unsigned integer between 1 and 128 that defines the length of the NCHAR column in code units.

cu_length omitted:
cu_length=1.

In SESAM/SQL the encoding form UTF-16 in which each code unit consists of 2 bytes is used for Unicode strings.


Range of values for NCHAR columns

An NCHAR column can contain national values of the length specified for the column.


Example

The MANUALS table contains one INTEGER and two NCHAR columns of fixed
length. The values which the NCHAR columns can contain are national strings of
the length 20 or 30:

ord_num       INTEGER
language      NCHAR(20)
title         NCHAR(30)