Neoview SQL Reference Manual (R2.4)
old-new-alias
is the list of correlation name of 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.
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 this trigger is activated.
searched-delete-statement
is a delete statement to be performed when this trigger is activated.
insert-statement
is an insert statement to be performed when this trigger is activated.
signal-statement
is a statement to be sent to the SIGNAL statement. The signal statement can be used as
a trigger action to allow a trigger execution to raise an exception that causes the triggered,
as well as the triggering statement, to fail.
set-new-statement
is an assignment statement that can be used as a BEFORE-trigger action to assign values
to transition variables representing columns in the subject table modified by the triggering
action.
quoted-sqlstate
is the four-digit SQLSTATE prefixed with an āsā or āSā and delimited by single quotes to be
passed to SIGNAL.
quoted-string-expr
is a string expression delimited by single quotes.
argument-list
is the list of arguments to pass to a stored procedure.
IF-statement
is a SQL IF statement. The SQL IF statement is a compound statement that provides conditional
execution based on the truth value of a conditional expression.
Considerations for CREATE TRIGGER
Triggers support up to 16 levels of recursion. Triggers have their own namespace.
The LIKE option of CREATE TABLE ignores triggers.
If you are running CREATE TRIGGER from the Neoview Command Interface, you must enter
a / (slash) on a newline to terminate the command. See Running SQL Statements in Chapter 4 of
the Neoview Command Interface (NCI) Guide.
Authorization and Availability Requirements
To create a trigger, you must be the schema owner or have CREATE privilege where the trigger
is defined.
94 SQL Statements