create or replace trigger setsalzero before insert on t for each row begin if :new.sal<0 then :new.sal:=0; end if; end; /