create or replace trigger insert_custom after insert on custom for each row declare -- local variables here code_no varchar2(30); begin code_no := :new.code; IF :new.code != '20110124' THEN Insert into customlog(Who,when,codeno) values( user, sysdate,code_no); END IF; end insert_custom;