1 create or replace trigger a_t before insert on a for each row
2 declare
3 v_t t.n%type;
4 cursor v_c is select n from t;
5 begin
6 open v_c;
7 loop
8 fetch v_c into v_t;
9 exit when v_c%notfound;
10 dbms_output.put_line(v_t);
11 end loop;
12 close v_c;
13* end;
SQL> /
触发器已创建
SQL> set serveroutput on size 10000
SQL> insert into a values(1);
1
2