i have wrote this trigger :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
create or replace trigger Check_dbSys
before insert on works
for each row
begin
if (:new.workst_wor='fa3146t') then
    :new.workst_wor:='0'
else
raise application error(-20030, ’ insertion anullé.’);
end if;
end;
1) i can't excute it in sql+ i dont know why can some one help me?
2) hwo can i abort the insertion when i am in else?

thanks