SQL$HELP_OLD72.HLB  —  CREATE  TRIGGER  Arguments

1  –  call-statement

    Specifies the stored procedure to invoke. You can only call
    procedures with IN parameters. Operations on the triggering table
    are not permitted due to possible side effects and recursive
    calls.

2  –  column-name

    The name of a column within the specified table to be checked for
    deletion, modification, or insertion. Use this argument only with
    UPDATE triggers.

3  –  delete-statement

    Specifies the row of a table that you want to delete. If you
    specify CURRENT OF cursor-name with the WHERE clause of the
    DELETE statement, you receive an error message because the cursor
    is not visible to the CREATE TRIGGER statement.

4  –  ERROR

    Provides the following message:

    RDMS-E-TRIG_ERROR, Trigger 'trigger_name' forced an error.

    A triggered ERROR statement cancels the DELETE, UPDATE, or INSERT
    statement that invoked the trigger.

5  –  FOR_EACH

    Syntax options:

    FOR EACH ROW | FOR EACH STATEMENT

    Specifies whether the triggered action is evaluated once per
    triggering statement, or for each row of the subject table that
    is affected by the triggering statement.

    If you specify FOR EACH STATEMENT, then the triggered action
    is evaluated only once, and row values are not available to the
    triggered action.

    The FOR EACH STATEMENT clause is the default.

6  –  insert-statement

    Specifies the new row or rows you want to add to a table.

7  –  old-correlation-name

    A temporary name used to refer to the row values as they existed
    before an UPDATE operation occurred. If you do not specify the
    FOR EACH ROW clause, this correlation name cannot be referred to
    in the triggered statement.

8  –  new-correlation-name

    A temporary name used to refer to the new row values to be
    applied by the UPDATE operation. If you do not specify the FOR
    EACH ROW clause, this correlation name cannot be referred to in
    the triggered statement.

9  –  referencing-clause

    Lets you specify whether you want to refer to the row values as
    they existed before an UPDATE operation occurred or the new row
    values after they are applied by the UPDATE operation. Do not use
    this clause with INSERT or DELETE operations.

    You can specify each option (OLD AS old-correlation-name or NEW
    AS new-correlation-name) only once in the referencing clause.

10  –  signal-statement

    Specifies that the signaled SQLSTATE status parameter is to be
    passed back to the application or SQL interface and that the
    current routine and all calling routines are to be terminated.
    This provides a more complete error mechanism than is provided by
    the ERROR clause.

11  –  STORED_NAME_IS

    Specifies a name that Oracle Rdb uses to access a trigger created
    in a multischema database. The stored name allows you to access
    multischema definitions using interfaces, such as Oracle RMU,
    the Oracle Rdb management utility, that do not recognize multiple
    schemas in one database. You cannot specify a stored name for a
    trigger in a database that does not allow multiple schemas. For
    more information on stored names, see the User_Supplied_Names
    HELP topic.

12  –  table-name

    The name of the table for which this trigger is defined.

13  –  trace-statement

    Allows applications to add triggers to log information when trace
    logging is active.

14  –  triggered-action

    Consists of an optional predicate, some triggered statements, and
    an optional frequency clause. If specified, the predicate must
    evaluate to true for the triggered statements in the triggered
    action clause to execute. Each triggered statement is executed in
    the order in which it appears within the triggered action clause.

15  –  triggered-statement

    Updates the database or generates an error message.

16  –  update-statement

    Specifies the row of a table that you want to modify. If you
    specify CURRENT OF cursor-name with the WHERE clause of the
    UPDATE statement, you receive an error message because the cursor
    is not visible to the CREATE TRIGGER statement.

17  –  WHEN predicate

    Describes the optional condition that must be satisfied before
    the associated triggered statements are executed. This predicate
    cannot refer to any host language variable.

    To avoid ambiguity between columns and external function
    callouts, use parentheses around the predicate in the WHEN
    clause.
Close Help