SQL/MX 3.x Reference Manual (H06.22+, J06.11+)
SQL/MX Statements
HP NonStop SQL/MX Reference Manual—640322-001
2-85
Syntax Description of CREATE TABLE
REF_CONSTRAINT_NO_ACTION_LIKE_RESTRICT. Options for this
attribute are:
When CASCADE is specified with the ON DELETE referential triggered
action, a row in the referencing table and its corresponding row in the
referenced-table is deleted. This maintains consistency between the
referencing and referenced tables.
When SET NULL is specified with the ON DELETE referential triggered
action, and a row from 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 DELETE referential
triggered action, and a row from 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.
When CASCADE is specified with the ON UPDATE referential triggered
action, a row in the referencing table and its corresponding row in the
referenced-table is updated.
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.
referenced-table is the table referenced by the foreign key in a referential
constraint. referenced-table cannot be a view. referenced-table
cannot be the same as table.
column-list specifies the column or set of columns in referenced-table
that corresponds to the foreign key in table. The columns in the column list
associated with REFERENCES must be in the same order as the columns in
the column list associated with FOREIGN KEY. If column-list is omitted, the
referenced table’s PRIMARY KEY columns are the referenced columns.
OFF SQL issues an error.
SYSTEM SQL issues warning 1302, indicating that it will behave like
RESTRICT. This is the default value.
ON Makes NO ACTION behave like RESTRICT, without warnings or
errors.
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.










