SQL/MX 3.2 Reference Manual (H06.25+, J06.14+)

SQL/MX Statements
HP NonStop SQL/MX Release 3.2 Reference Manual691117-001
2-137
Considerations for CREATE TRIGGER
constraints are checked. BEFORE-type triggers are used to condition input data, while
AFTER-type triggers encode actual application logic.
Restrictions on Triggers
The trigger feature does not allow the use of:
Publish/Subscribe's embedded update and embedded delete statements as
triggering actions or events.
INSERTs, UPDATEs, and DELETEs found in compound statements delimited
by BEGIN … END as triggering events.
Compound statements delimited by BEGIN … END as part of a triggered
action.
Positioned deletes and updates as triggered statements.
Do not use triggers on SQL/MX user metadata (UMD) tables, system metadata,
and NonStop MXCS metadata tables.
You cannot define triggers on SQL/MP objects. SQL/MP objects cannot be
referenced in a trigger.
Triggers are not allowed on SQL/MP aliases.
All types of subqueries are not supported in search-condition for AFTER
triggers:
Nested subqueries, queries containing UNION construct and compound
statements are not allowed.
The transition table cannot be referenced in the WHEN clause of an AFTER
trigger statement.
INSERT, DELETE, and UPDATE queries are not allowed in the WHEN clause
of an AFTER trigger statement.
Recompilation and Triggers
User applications that change (INSERT, UPDATE, or DELETE) information in a table
are automatically recompiled when a trigger with a matching event is added or
dropped. User applications that use a SELECT on the subject table do not require
recompilation. User applications do not require an SQL compilation when a trigger is
changed from DISABLED to ENABLED, or from ENABLED to DISABLED, using the
ALTER TRIGGER statement. User applications require SQL recompilations only when
triggers are added or dropped. No source code changes or language compilations are
required.