0
Create or replace trigger trig_error
before insert or update or delete on emp
begin
     if to_char(sysdate,'DY') IN ('SAT','SUN') then
         raise_application_error(-20111,'No changes can be made on tuesday');
     end if;
end;
dbms_output.put_line('no changes can be done on SAT and SUN!!’);

But getting the output like this: Warning: Trigger created with compilation errors.

APC
  • 144,005
  • 19
  • 170
  • 281

0 Answers0