Oracle PL/SQL Tutorial/Trigger/Table level trigger
An after statement level trigger and an after row level trigger
<source lang="sql">
SQL> SQL> CREATE TABLE to_table
2 (col1 NUMBER);
Table created. SQL> SQL> SQL> SQL> CREATE OR REPLACE TRIGGER statement_trigger
2 AFTER INSERT ON to_table 3 BEGIN 4 DBMS_OUTPUT.PUT_LINE("After Insert Statement Level"); 5 END; 6 /
Trigger created. SQL> SQL> CREATE OR REPLACE TRIGGER row_trigger
2 AFTER INSERT ON to_table 3 FOR EACH ROW 4 BEGIN 5 DBMS_OUTPUT.PUT_LINE("After Insert Row Level"); 6 END; 7 /
Trigger created. SQL> SQL> drop table to_table; Table dropped. SQL> SQL></source>