create or replace trigger trg_add_emp_info before insert on emp2 for each row declare --local variables here begin select seq_trg_id.nextval into :new.e_id from al; if :new.e_sal <0 then :new.e_sal:=0; elsif :new.e_sal>10000 then :new.e_sal:=10000; end if; end;