Question:
How many types of database triggers can be specified on a table ? What are they ?
Answer:
Insert Update Delete Before Row o.k. o.k. o.k. After Row o.k. o.k. o.k. Before Statement o.k. o.k. o.k. After Statement o.k. o.k. o.k. If FOR EACH ROW clause is specified, then the trigger for each Row affected by the statement. If WHEN clause is specified, the trigger fires according to the returned Boolean value. Source: CoolInterview.com
Row level trigger,Statement level trigger,Instead of trigger(created on views) Source: CoolInterview.com
Answered by: shrinivas singh | Date:
| Contact shrinivas singh
Baically there only 1 type of trigger which can be fired on the table. .i.e., DML TRIGGER.
There are 14 types of DML TRIGGER But we can fire only 12 types of triggers, because remaining 2 types of triggers fire on View.
1. Before insert on ROW LEVEL TRIGGER 2. 1. AFTER insert on ROW LEVEL TRIGGER
3. Before insert on STATEMENT LEVEL TRIGGER 4. After insert on STATEMENT LEVEL TRIGGER
5. Before update on ROW LEVEL TRIGGER 6. After update on ROW LEVEL TRIGGER
7. Before update on STATEMENT LEVEL TRIGGER. 8. After update on STATEMENT LEVEL TRIGGER.
9. Before Delete on STATEMENT LEVEL TRIGGER. 10 After Delete on STATEMENT LEVEL TRIGGER.
11. Before Delete on ROW LEVEL TRIGGER. 12 After Delete on ROW LEVEL TRIGGER Source: CoolInterview.com
Answered by: RISHI RAWAT | Date: 4/10/2009
| Contact RISHI RAWAT
We can fire 12 type of triggers. DML: Insert, Update, Delete Timing: Before, After Levels: Row, Statment
all combination of these three will be 12 can be fired. Source: CoolInterview.com
Answered by: Dipti Saxena | Date: 5/29/2010
| Contact Dipti Saxena
There are 2 Types Of Triggers:
Statement Trigger which fires only once regardless of number of rows.
Row Trigger which fires once for each row. Source: CoolInterview.com
Answered by: Pariksheet De | Date: 7/20/2010
| Contact Pariksheet De
There are four types of database triggers: Table-level triggers can initiate activity before or after an INSERT, UPDATE, or DELETE event. View-level triggers defines what can be done to the view. Database-level triggers can be activated at startup and shutdown of a database. Session-level triggers can be used to store specific information. Source: CoolInterview.com
Answered by: Vivek T | Date: 8/26/2010
| Contact Vivek T
(3+4)*2*2=28 triggers (ins,upd,del + 4 combination)*2 timing*2 level Source: CoolInterview.com
Answered by: Santo | Date: 8/27/2010
| Contact Santo
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|