SQL/MX 3.2 Reference Manual (H06.25+, J06.14+)

SQL/MX Statements
HP NonStop SQL/MX Release 3.2 Reference Manual691117-001
2-20
Syntax Description of ALTER TABLE
referenced-table, the referencing column(s) of the referencing row
from the referencing table is set to its DEFAULT value.
A table can have an unlimited number of referential constraints, and you can
specify the same foreign key in more than one referential constraint, but you
must define each referential constraint separately.
DROP CONSTRAINT constraint [RESTRICT | CASCADE]
drops a constraint from the table. The constraint name constraint must be
specified. If you did not specify a name when you created the constraint or do not
know the constraint name, you can use SHOWDDL to display it.
A referential constraint is dependent on its referenced column list. This column list
is associated with a UNIQUE or PRIMARY KEY constraint. When a UNIQUE or
PRIMARY KEY constraint is dropped, NonStop SQL/MX checks if any referential
constraints are dependent on the constraint.
If you specify RESTRICT and referential constraints are dependent on the
constraint, you cannot drop the constraint.
If you specify CASCADE and referential constraints are dependent on the
constraint, those dependent constraints are dropped in addition to the specified
constraint being dropped.
If you drop a constraint, NonStop SQL/MX drops its dependent index if SQL/MX
originally created the same index. If the constraint uses an existing index, the index
is not dropped.
The default is RESTRICT.
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-13.
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... .
Note. The referential actions CASCADE, SET NULL, and SET DEFAULT are
available only on systems running J06.09 and later J-series RVUs and H06.20 and
later H-series RVUs.