Skip to content
Advertisement

PL/SQL table mutation and trigger Format

I just started with triggers, I want the trigger to give me the msg error if the new tauxHoraire is 50% greater than the current tauxHoraire (so *1.5 >).

The trigger compiles but I’m getting ORA-04091: table name is mutating, trigger/function may not see it. There might a problem in how I wrote it. Or is the problem somewhere else?

My test:

Advertisement

Answer

Here is the trigger that will raise error when the prixHeure is greater then (1.5 * current prixHeure).

Sample:

Error:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement