SQL/MX 3.2.1 Reference Manual (H06.26+, J06.15+)
SQL/MX Statements
HP NonStop SQL/MX Release 3.2.1 Reference Manual—691117-005
2-145
Syntax Description of CREATE TRIGGER
[[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.
triggered-SQL-statement
is the SQL statement to be performed when this trigger is activated.
searched-update-statement
is an update statement to be performed when the AFTER trigger is activated.
searched-delete-statement
is a delete statement to be performed when the AFTER trigger is activated.
call-statement
is a CALL statement to be performed when the AFTER trigger is activated.
This support is available from SQL/MX Release 3.2.










