statement trigger and row level trigger
193210Sep 13 2011 — edited Sep 13 2011Hi,
In fact i don't well understand the difference between a statement trigger and a row level statement.
Here is a statement trigger
create or replace trigger secure_emp
BEFORE UPDATE on EMP
BEGIN
IF (to_char(sysdate, 'DY') IN ( 'SAT', 'SUN')) OR ( TO_CHAR(sysdate, 'HH24') NOT BETWEEN '8' AND '18')
THEN
RAISE_APPICATION_ERROR (-20504, 'you may only update EMP during office hours ');
END if;
END secure_emp;
Even it is not written FOR EACH ROW, this statement will oblige to check each updated row,_ to check if the Sysdate( 'DY' format) = 'SAT ou SUN' or if the sysdate('HH24' format) format is not betwenn '8' and '18'
What is then the difference between them.
Thanks a lotfor your answer i really need.
Best regards.
Natahlie