O'Reilly logo

Oracle Database XE 11gR2 Jump Start Guide by Asif Momen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

PL/SQL triggers

Triggers are SQL and PL/SQL blocks which are implicitly executed by Oracle when a INSERT, UPDATE, or DELETE statement is issued against the associated table. You cannot explicitly invoke a trigger; however, you can enable and disable a trigger.

A trigger has three basic parts:

  • Triggering event or statement: This can be a INSERT, UPDATE, or DELETE statement on a table
  • Timing point: Determines whether the trigger fires before or after the triggering statement and whether it fires for each row that the triggering statement affects
  • Trigger action: This is the procedure that contains the SQL & PL/SQL statements and code to be run

There are two ways of firing a trigger. Firstly, fire the trigger once for the triggering statement irrespective ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required