Considerations For Create Trigger; Authorization And Availability Requirements; Trigger Types - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

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 Neoview Script, you must enter a / (slash) on a
newline to terminate the command. See Running SQL Statements in Chapter 4 of the Neoview
Script Guide.

Authorization and Availability Requirements

To create a trigger, you must own the schema where the trigger is defined and the schema where
the subject table of the schema resides and you must have REFERENCES privileges on the
columns used on the referenced table. Otherwise, you must be the services ID.

Trigger Types

You can configure triggers as BEFORE or AFTER types. When a triggering statement occurs, this
is the order of execution:
82
SQL Statements

Advertisement

Table of Contents
loading

Table of Contents