1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| SQL> CREATE OR REPLACE TRIGGER trg_ins_upd_matable
2 before insert or update on a
3 begin
4 raise_application_error (-20000, 'ERREUR');
5* end;
Trigger created.
SQL> insert into a values ('x', 'X');
insert into a values ('x', 'X')
*
ERROR at line 1:
ORA-20000: ERREUR
ORA-06512: at "COMPTA.TRG_INS_UPD_MATABLE", line 2
ORA-04088: error during execution of trigger 'COMPTA.TRG_INS_UPD_MATABLE'
SQL> select * from a;
COL1 COL2
------------------------------ --------------------------------------------------
a A
b B |
Partager