What is trigger in oracle?

What is trigger in Oracle?

- Triggers are constructs in PL/SQL that need to be just created and associated with a table.

- Once they are created, the table associated with it gets updated due to an UPDATE, INSERT or a DELETE, the triggers get implicitly fired depending upon the instructions passed to them.

- In many cases, triggers supplement the standard capabilities of Oracle to provide a highly customized database management system.

- For example, a trigger can permit DML operations against a table only if they are issued during regular business hours.

- The standard security features of Oracle, roles and privileges, govern which users can submit DML statements against the table.

- In addition, the trigger further restricts DML operations to occur only at certain times during weekdays.

- This is just one way that you can use triggers to customize information management in an Oracle database.

In addition, triggers are commonly used to:

1. Automatically generate derived column values
2. Prevent invalid transactions
3. Enforce complex security authorizations
4. Enforce referential integrity across nodes in a distributed database
5. Enforce complex business rules
6. Provide transparent event logging
7. Provide sophisticated auditing
8. Maintain synchronous table replicates
9. Gather statistics on table access
What are the types of triggers?
The different types of triggers are: Row triggers and statement triggers: specifies how many times the trigger should get executed – Once for every row or once for every triggering statement....
How the triggers are attached to the table?
When we write a trigger, we also have to give the reference of the table the trigger has to be fired on.....
What are triggering attributes?
Triggers can be fired based on the following criteria: Category - (INSERT, DELETE, UPDATE) i.e. which kind of DML statement causes the trigger to fire...
Post your comment
Discussion Board
What are triggers
Triggers are PL/SQL stored procedures, which are executed in response of specified event in database
Indu 04-19-2015