NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
D-4
Data Types
Specifying a collation for the column might effect the performance of certain
queries using the column because SQL cannot perform hash joins or hash groupings
on columns associated with collations.
The default is CHARACTER SET.
PIC[TURE] X [(len)] [DISPLAY]
specifies a column with fixed-length character data.
You can specify the number of characters in a PIC X column with either the len
option described earlier or by specifying multiple Xs, with each X representing one
character position. DISPLAY is an optional keyword that does not change the
meaning of the clause.
Unless you specify additional clauses, the default for data type PIC X is a single-
byte column with an UNKNOWN character set and a collating sequence based on
the binary values of the characters, the same as for data type CHAR.
VARCHAR[ACTER]
specifies a column with varying-length character data. VARCHAR is equivalent to
data type CHAR VARYING.
NATIONAL CHAR[ACTER]
specifies a column with double-byte character data from the system default
multibyte character set.
Unless you specify additional clauses, an item in the column consists of one fixed-
length, double-byte character.
NCHAR[ACTER]
is equivalent to data type NATIONAL CHARACTER.
NUMERIC [ (digits[,scale]) ] [ SIGNED | UNSIGNED ]
specifies an exact numeric column.
digits and scale are positive integers that specify the number of digits and the
number of digits to the right of the decimal point, respectively. digits cannot
exceed 18.
SIGNED or UNSIGNED indicates whether the column values are signed or
unsigned. If digits is 10 or more, the values must be SIGNED.
The default is NUMERIC (1,0) SIGNED.