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

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-13
Syntax Description of ALTER TABLE
HEADING 'heading-string'| NO HEADING
specifies a string heading-string of 0 to 128 characters to use as a
heading for the column if it is displayed with a SELECT statement in MXCI.
The heading-string can contain characters only from the ISO88591
character set. The default heading is column, the column name. If you specify
a heading that is identical to the column name, INVOKE and SHOWDDL do
not display that heading.
If you specify NO HEADING or HEADING ‘’, NonStop SQL/MX stores this as
HEADING ‘’, and the column name is displayed as the heading in a SELECT
statement. The behavior for HEADING ‘’ is different from that of NonStop
SQL/MP, which does not display anything for a heading in a SELECT
statement if the heading is specified as HEADING ‘’.
[CONSTRAINT constraint] column-constraint
specifies a name constraint and constraint definition for a column
constraint. See Database Object Names on page 6-12.
ADD [CONSTRAINT constraint] table-constraint
adds a constraint to the table and optionally specifies constraint as the name
for the constraint. The new constraint must be consistent with any data already
present in the table.
CONSTRAINT constraint
specifies a name for the column or table constraint. constraint must have
the same catalog and schema as table and must be unique among constraint
names in that schema. If you omit the catalog portion or the catalog and
schema portions of the name you specify in constraint, NonStop SQL/MX
expands the name by using the catalog and schema for table. See Database
Object Names on page 6-12.
If you do not specify a constraint name, NonStop SQL/MX constructs an SQL
identifier as the name for the constraint in the catalog and schema for
table.The identifier consists of the fully qualified table name concatenated
with a system-generated unique identifier. For example, a constraint on table
A.B.C might be assigned a name such as A.B.C_971..._01... . .
UNIQUE
or
UNIQUE column-list
is a column or table constraint (respectively) that specifies that the column or
set of columns cannot contain more than one occurrence of the same value or
set of values. If you omit UNIQUE, duplicate values are allowed.
column-list cannot include more than one occurrence of the same column.
In addition, the set of columns you specify on a UNIQUE constraint cannot
match the set of columns on any other UNIQUE constraint for the table or on