SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual540440-003
6-20
Character String Data Types
collation
is the collation. The only allowed collation is DEFAULT.
The UPSHIFT clause directs NonStop SQL/MX to upshift characters before storing
them in the column.
CHAR[ACTER] [(length [CHARACTERS])] [char-set] [collate-clause]
[UPSHIFT]
specifies a column with fixed-length character data.
PIC[TURE] X[(length)] [DISPLAY] [char-set] [collate-clause]
[UPSHIFT]
specifies a column with fixed-length character data.
You can specify the number of characters in a PIC X column by specify either
length or multiple Xs, with each X representing one character position. DISPLAY
does not change the meaning of the clause.
PIC is an SQL/MX extension.
CHAR[ACTER] VARYING (length) [CHARACTERS] [char-set]
[collate-clause] [UPSHIFT]
specifies a column with varying-length character data. VARYING specifies that the
number of characters stored in the column can be fewer than the length.
Note that values in a column declared as VARYING can be logically and physically
shorter than the maximum length, but the maximum internal size of a VARYING
column is actually four characters larger than the size required for an equivalent
column that is not VARYING.
VARCHAR (length) [char-set] [collate-clause] [UPSHIFT]
specifies a column with varying-length character data.
VARCHAR is equivalent to data type CHAR[ACTER] VARYING.
NCHAR [(length)] [collate-clause] [UPSHIFT]
NATIONAL CHAR[ACTER] [(length)] [collate-clause]
[UPSHIFT]
specifies a column with data in the pre-defined national character set.
NCHAR VARYING [(length)] [collate-clause] [UPSHIFT]
NATIONAL CHAR[ACTER] VARYING (length) [collate-clause]
[UPSHIFT]
specifies a column with varying-length data in the pre-defined national character
set.