SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)

Creating an SQL/MX Database
HP NonStop SQL/MX Installation and Management Guide523723-004
7-23
Managing Table Data
Defining Character Data
NonStop SQL/MX includes both fixed-length character data and variable-length
character data. The data types for character data are:
For NonStop SQL/MX, the maximum row size for fixed-length and variable-length
character columns is 4040 bytes. However, the actual row size is less because of bytes
used by the header, null indicator, column length indicator, and other system features.
For more information about character column length, see the SQL/MX Reference
Manual.
Fixed-length and variable-length character data can be associated with a character set
by specifying the CHARACTER SET clause on the host variable declaration.
A character data type is compatible with another character data type with the same
character set. It is not compatible with numeric, datetime, or interval data types, or with
character data associated with a different character set.
You can specify one of these two character sets for an SQL/MX table column:
ISO88591 is a default single-byte 8-bit character set for character data types. It
supports English and other Western languages.
USC2 is a double-byte Unicode character set in UTF16 big-endian encoding. All
Basic Multilingual Plan (BMP) characters are included. Surrogate characters are
treated as two double-byte characters.
You define the national character set for NCHAR and NCHAR VARYING columns in
SQL/MX tables when you run the InstallSqlmx script to initialize NonStop SQL/MX.
The value for the InstallSqlmx -n option can be ISO88591, UCS2, KANJI, or
KSC5601. However, if you specify KANJI or KSC5601 and later attempt to create an
SQL/MX table with an NCHAR column, you receive an error message because
SQL/MX tables do not support the KANJI or KSC5601 character sets. If you do not
specify a value for the -n option, the national character set defaults to UCS2. For more
information, see InstallSqlmx Options
on page 3-25.
Fixed-length characters CHAR
PIC
NCHAR, NATIONAL
CHAR, or NATIONAL
CHARACTER
Variable-length characters CHAR VARYING
VARCHAR
NCHAR VARYING or
NATIONAL CHAR
VARYING