How many different types of triggers can exist in a table in Oracle?

Options
- 10
- 12
- 15
- 16


CORRECT ANSWER : 12

Discussion Board
Trigger

Trigger is stored in the database which includes SQL and PL/SQL or Java statements to run as a unit and invokes stored procedures. Triggers are implicitly fired by Oracle when a triggering event occurs, no matter which user is connected or which application is being used. There are 12 types of triggers can exist in a table in Oracle: 3 before statement, 3 after statement, 3 before each row and 3 after each row.

Prajakta Pandit 02-9-2017 04:05 AM

How the question phrased

On a single table you can define as many triggers as you need. Base on presented choices and correct answer the question should be "How many different types of triggers exist", which is 12: 3 before statement, 3 after statement, 3 before each row and 3 after each row.

Nick 08-21-2014 06:18 AM

It is unlimited

You can have all types of triggers per each column. And there is nothing stopping you writing multiple triggers per column per operation.

Perhaps you could phrase it like this:
"How many types of triggers can be applied to a single column?"

Olga 05-16-2014 08:51 PM

Query@Ravi

Insert/Update/Delete :- 3
Before/After:- 2
Row Level/Statement Level:-2

Hence 3*2*2.

Question may be confusing. The 3*2*2=12 is the number of different types of triggers.

I've seen more than 25 triggers on a single table before with multiple before update triggers and multiple before insert triggers. The issue with multiple triggers is there is no guarantee of the order they get executed in so there can be timing issues in this situation. When this happens you have to combine the two triggers so execution order can be controlled.

Chandan Singh 03-15-2014 11:38 PM

Query?

Is there any specific reason why the count is 12 ?
As per many books on Oracle and tutorials on web, the answer is unlimited as there is no specific limit for the number of triggers.


Ravi 11-20-2013 09:05 PM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement