EDIT: I don't know what kind of distribution this is, this is in an exam article.
I just don't get it, unfortunately. I am quite happy with the Row level triggers, but can someone explain to me how the results would differ if the trigger was an instruction level instead?
Relationship / Arming / Row Level Trigger
Employee(ID VARCHAR2(30), Salary NUMBER) Create Trigger AutoRaise After insert on Employee Referencing new table as NT update Employee Set salary = salary + (select avg(salary) from NT) Create trigger AutoRaise After insert on Employee Referencing new table as NT For each Row Update employee Set salary = salary + (select avg(salary) from NT)
I understand that in every line trigger it will fire for every line affected by the launch statement. Now the instruction level trigger will change the results differently? Say, if I inserted five tuples in one statement, I would set a salary, etc. For all? If so, what effect is triggered at the row level?
I tried searching, but I just can't get around it.
Thanks,
EDIT: Now, I'm just tight, but will it either run different results? For an instruction level trigger, if I used example values:
In the table before creating the trigger:
(A,50)
An operator has been added to the ONE after the trigger fires:
(B,70), (C,30)
The first trigger would set a salary for each inserted set, right? Thus, the first value will be 120 (the average value is 50, 70 + 50 = 120), and the second will be 80. If so, then how does the second trigger differ in results?
Mo moosa
source share