I have created a trigger where data cannot be edited on Saturday and Sunday on emp table

62 Views Asked by At
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.

0

There are 0 best solutions below