Cornell (Juliette Lewis) finds Eric (Michael Ealy) going through Kate's (Jordana Brewster) mail and offers some insights. Watch Secrets and Lies, Sundays at 9|8c on ABC!
A trigger is a named PL/SQL unit that is stored in the database and executed ( fired ) in response to a specified event that occurs in the database.
Overview of Triggers.
A trigger is a named program unit that is stored in the database and fired (executed) in response to a specified event. The specified event is associated with either a table, a view, a schema, or the database, and it is one of the following:
A database manipulation (DML) statement ( DELETE , INSERT , or UPDATE )
A database definition (DDL) statement ( CREATE , ALTER , or DROP )
A database operation ( SERVERERROR , LOGON , LOGOFF , STARTUP , or SHUTDOWN )
The trigger is said to be defined on the table, view, schema, or database.
A DML trigger is fired by a DML statement, a DDL trigger is fired by a DDL statement, a DELETE trigger is fired by a DELETE statement, and so on.
An INSTEAD OF trigger is a DML trigger that is defined on a view (not a table). The database fires the INSTEAD OF trigger instead of executing the triggering DML statement. For more information, see Modifying Complex Views (INSTEAD OF Triggers).
A system trigger is defined on a schema or the database. A trigger defined on a schema fires for each event associated with the owner of the schema (the current user). A trigger defined on a database fires for each event associated with all users.
A simple trigger can fire at exactly one of the following timing points :
Before the triggering statement executes.
After the triggering statement executes.
Before each row that the triggering statement affects.
After each row that the triggering statement affects.
A compound trigger can fire at more than one timing point. Compound triggers make it easier to program an approach where you want the actions you implement for the various timing points to share common data. For more information, see Compound Triggers.