Oracle触发器实例
/**********触发器 实例一***********/ create or replace trigger my_triggers before insert or update or delete on users for each row declare info varchar2(50); begin if inserting then info:='insert'; elsif updating then info:='update'; else info:='delete'; end if; dbms_output.put_line('info = ' || info); dbms_output.put_line('触发器被触发2!'); end; insert into users values(1009,'name','000000');--insert语句验证触发器 /**********触发器 实例二*************/ create or replace trigger my_trigger3 before insert on users for each row begin update users set users.password='123456' where users.id='1009'; dbms_output.put_line('触发器被触发3'); end; insert into users values(1010,'name','000000'); --insert语句验证触发器