SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
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.
collation is the name of an existing collation (or an equivalent
DEFINE) that specifies a collating sequence that is
associated with the same character set as the column
CHARACTER SET specifies a collating sequence based on the binary value
of characters in the column