SQL/MX 2.x Reference Manual (H06.10+, J06.03+)
SQL/MX Statements
HP NonStop SQL/MX Reference Manual—544517-008
2-17
Syntax Description of ALTER TABLE
When SET NULL is specified with the ON UPDATE referential triggered
action, and a row in the referencing table matches the row in the
referenced-table, the referencing column(s) of the referencing row
from the referencing table is set to NULL.
When SET DEFAULT is specified with the ON UPDATE referential
triggered action, and a row in the referencing table matches the row in the
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.
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.










