SQL/MX 3.2 Reference Manual (H06.25+, J06.14+)
SQL/MX Statements
HP NonStop SQL/MX Release 3.2 Reference Manual—691117-001
2-133
Syntax Description of CREATE TRIGGER
Syntax Description of CREATE TRIGGER
trigger-name
specifies the ANSI logical name of the trigger to be added, of the form:
[[catalog-name.]schema-name.]trigger-name
where each part of the name is a valid SQL identifier with a maximum of 128
characters. For more information, see Identifiers on page 6-56.
column-name
specifies the ANSI logical name of the column to be inserted, deleted, or updated
when the trigger is activated, of the form:
[[catalog-name.]schema-name.]column-name
where each part of the name is a valid SQL identifier with a maximum of 128
characters.
table-name
specifies the ANSI logical name of the table this trigger is defined on, of the form:
[[catalog-name.]schema-name.]table-name
where each part of the name is a valid SQL identifier with a maximum of 128
characters. Triggers can be defined only on SQL/MX tables.
FOR EACH { ROW | STATEMENT }
specifies whether the trigger is based on a row or a statement. If you do not specify
this clause, the default is ROW for a BEFORE trigger and STATEMENT for an
AFTER trigger.
old-new-alias
is the list of correlation names or table aliases used by a trigger.
correlation-name
is the name of the old or new row acted upon by the trigger.
table-alias
is the name of the old or new table acted upon by the trigger.
search-condition
is the condition that, when true, activates this trigger. Starting with SQL/MX
Release 3.2, AFTER Triggers support subqueries in the search-condition.
Simple subqueries with joins and GROUP BY are supported.










