Triggers

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email

ORACLE allows you to define procedures that are implicitly executed when an insert, Update, delete statement is issued against the associated table. These procedures are called database triggers. Triggers can be defined only on tables and not on views. The triggers which we use in FORMS is different since they are fired only when a trigger point is executed with in a specific application in FORMS. The database trigger is executed against a table, no matter what user or application issues the statement (insert, update, delete)

Database triggers can be used to :

audit data modifications
log events transparently
enforce complex business rules
derive column values automatically
implement complex security authorizations
maintain replicate tables
A trigger has three basic parts
a triggering event or statement
a trigger restriction
a trigger action

A trigger event or statement is the SQL statement that causes a trigger to be fired. A trigger event can be an insert, update or delete statement for a specific table.

A trigger restriction specifies a BOOLEAN expression that must be run for the trigger to fire. The trigger action wont take place if it evaluates to false. For example, it will fire when the condition is true.

QUANTITY_ON_HAND < REORDER_LEVEL

A trigger action is the procedure that contains the SQL statements and PL/SQL code to be executed when a triggering statement is issued and the trigger restriction evaluates to true.

FOR EACH ROW
DECLARE
......
BEGIN
SELECT .....
INSERT...
END;



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.