oracle - PLSQL Trigger: before insert -


am trying write trigger has restrict 0 salary before insertion. have written not working. getting error trigger invalid , failed re validation.

code:

create or replace trigger emp_sal   before insert or update on employee   referencing new new old old   each row begin      if :new.salary<=0          raise_application_error (-20999,’salary zero’);      end if; end; / 

please let me know problem is. thank you

your code okay. problem can imagine using wrong character single quotes in ’salary zero’.

run show errors right after created trigger (assuming you're uning sqlplus)

but agree zerkms. case check constraint.


Comments

Popular posts from this blog

python 3.x - Mapping specific letters onto a list of words -

javascript - jquery or ashx not working -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -