Sunday, February 22, 2009

Nobody should be allowed to update emp table on Sunday write a trigger for this.

SQL> create or replace trigger emptri before update on emp for each row
2 begin
3 if to_char(sysdate,'D')=1 then
4 raise_applicaton_error(-20001,'Not allowed on sunday');
5 end if;
6 end;
7 /