Professional Documents
Culture Documents
Triggers
Triggers
Trigger
• A database trigger is a stored PL/SQL program unit
associated with a specific table.
• Triggers are similar to procedures or functions and must
be stored in a database.
• Triggers implicitly gets fired whenever the table is affected
by any SQL operation.
• Triggers does not accept arguments.
• The act of executing a trigger is known as firing the trigger.
• The trigger event can be a DML operation on a table or
certain kinds of views.
• Triggers can be used for system event such as database
startup or shutdown and certain kinds of DDL.
Purposes
• To generate data automatically
• To enforce complex integrity constraints
• Complex security authorizations
• To maintain replicate tables
• To audit data modifications.
• Automatically signaling other programs that action needs
to take place when changes are made to the table.
• Derive column values automatically