SQL/MX 2.x Reference Manual (H06.10+, J06.03+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual544517-008
2-84
Syntax Description of CREATE TABLE
referential action
RESTRICT referential action means that the referential check is
made for each row. An error is raised when the referential constraint is
violated.
ANSI SQL-99 standard: NO ACTION referential action means that
the referential check is made at the end of the SQL statement. An error is
raised when the referential constraint is violated.
NonStop SQL/MX does not support NO ACTION referential action in the
way it is specified by ANSI SQL-99. However, you can change NO
ACTION's behavior to be the same as RESTRICT by setting an
appropriate value for the Control Query Default
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
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.