Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

statement trigger and row level trigger

193210Sep 13 2011 — edited Sep 13 2011
Hi,


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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 11 2011
Added on Sep 13 2011
3 comments
749 views