Create Trigger |
The following information applies to a trigger, which is which is a stored PL/SQL block associated with a table, a schema, or the database, or an anonymous PL/SQL block or a call to a procedure implemented in PL/SQL or Java. The trigger is automatically executed when the specified conditions occur.
Trigger Owner: Database schema in which to create the trigger.
Name: Name of the trigger. Must be unique within the database.
Trigger Type: The type of object on which to create the trigger: TABLE, VIEW, SCHEMA, or DATABASE. (The remaining items depend on the type of trigger.)
Table Owner or View Owner: For a trigger on a table or a view, the name of the owner of the table or the view.
Table Name or View Name : For a trigger on a table or a view, the name of the table or the view.
Before or After: For a trigger on a table, select Before to cause the database to fire the trigger before executing the triggering event, or select After to cause the database to fire the trigger after executing the triggering event.
Statement Level or Row Level: For a trigger on a table, Statement Level fires the trigger once before or after the triggering statement that meets the optional trigger constraint defined in the WHEN condition; Row Level fires the trigger once for each row that is affected by the triggering statement and that meets the optional trigger constraint defined in the WHEN condition.
Insert, Update, Delete: For a trigger on a table or a view, Insert fires the trigger whenever an INSERT statement adds a row to a table or adds an element to a nested table; Update fires fire the trigger whenever an UPDATE statement changes a value in one of the columns specified in Selected Columns (or in any column if no columns are specified); Delete fires the trigger whenever a DELETE statement removes a row from the table or removes an element from a nested table.
Referencing - Old: For a trigger on a table, the correlation names in the PL/SQL block and WHEN condition of a row trigger to refer specifically to old value of the current row.
Referencing - New: For a trigger on a table, the correlation names in the PL/SQL block and WHEN condition of a row trigger to refer specifically to new value of the current row.
Available Columns: For a trigger on a table, lists the columns from which you can select for use in an Update trigger definition.
Selected Columns: For a trigger on a table, lists the columns used in an Update trigger definition.
When: For a trigger on a table, an optional trigger condition, which is a SQL condition that must be satisfied for the database to fire the trigger. This condition must contain correlation names and cannot contain a query.
Schema: For a trigger on a schema, the name of the schema on which to create the trigger.
Available Events: For a trigger on a schema or database, lists events from which you can select for use in the trigger definition.
Selected Events: For a trigger on a schema or database, lists events used in the trigger definition.
For more information about triggers, see Triggers: Usage Information.
Related Topics