SQL/MX 2.x Reference Manual (H06.10+, J06.03+)
SQL/MX Statements
HP NonStop SQL/MX Reference Manual—544517-008
2-16
Syntax Description of ALTER TABLE
update rule specifies what referential action is taken when
column-list in referenced-table is updated. If no ON UPDATE
clause is specified, a default of ON UPDATE NO ACTION is assumed.
delete rule specifies what referential action is taken when a
row in referenced-table is deleted. If no ON DELETE clause is
specified, a default of ON DELETE NO ACTION is assumed.
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.
OFF SQL issues an error.
SYSTEM SQL issues warning 1302, indicating that it will behave like
RESTRICT. The default is SYSTEM.
ON Makes NO ACTION behave like RESTRICT, without warnings or
errors.










