Deepesh kumar Gupta
Deepesh kumar Gupta

Reputation: 896

How many triggers we can have on a single table in Oracle DB

I have a confusion on maximum numbers of different type of triggers we can have on a single table in oracle db.

Upvotes: 2

Views: 12173

Answers (2)

Anuj Rana
Anuj Rana

Reputation: 11

You can have more than one trigger at same point of time. You can achieve that using FOLLOWS keyword while creating trigger.

Upvotes: 1

Wernfried Domscheit
Wernfried Domscheit

Reputation: 59513

Do you encounter any problems due to any limit?

You can have triggers of these timing points:

  • BEFORE statement triggers
  • BEFORE row triggers
  • AFTER row triggers
  • AFTER statement triggers

In case you have more than one trigger at a timing point the order of execution is undetermined, thus it should be very uncommon to have many triggers for the same timing point.

Oracle documentation says:

You cannot control the order in which multiple row triggers fire.

If two or more triggers are defined with the same timing point, and the order in which they fire is important, then you can control the firing order using the FOLLOWS clause.

Upvotes: 3

Related Questions