Answered Questions

  • TCL Statements in Trigger

    Why are we not supposed to include TCL statements in a trigger?

    manveshv

    • Dec 30th, 2009

    The trigger is fired when an event occurs while manipulating the data in table.So the trigger applies a lock on it restricting others to modify it.Locks are released when a TCL command is executed. Th...

    Vansat

    • Jun 16th, 2009

    We cannot use TCL statements in triggers, because using them violates the integrity of the transaction. But if we want TCL statements to be used in triggers then that can be implemented by using Auton...

  • How many types of database triggers can be specified on a table? What are they?

    Star Read Best Answer

    Editorial / Best Answer

    krishnaindia2007  

    • Member Since Sep-2007 | May 6th, 2008


    A trigger may be a
    1. DML Trigger on tables
    2. Instead of triggers on views
    3. System triggers on database or schema

    Based on the way it executes statements  triggers are of two types
    1. Statement leve trigger
    2.  Row level trigger

    A trigger fires for three actions
    1. Insert
    2. Delete 
    3.Update

    and the trigger can the fired
    1. Before action
    2. After action.

    Pradeep

    • Feb 20th, 2016

    Basically 5 main types in Oracle Triggers
    1. DML Trigger (3 statement * 2 timing * 2 level = 12 types).
    2. DDL Trigger.
    3. Instead of Trigger (Fired Complex View).
    4. System Trigger.
    5. Compound Trigger (Introduced by 11g)

    tarini sankar das

    • Feb 7th, 2014

    Actual answer is we have 14 types of triggers in pl sql. For statement level :- 1-before insert 2-before update 3-before delete 4-after insert 5-after update 6-after delete For row level :- 7-before ...