STATEMENT LEVEL TRIGGER EXAMPLE:
Create or Replace Trigger MyTrig
Before
Delete or Update or Insert
on Emp
Declare
T number;
Begin
Select to_char(Sysdate,'hh24') into T from Dual;
If (T>=9 and T<=10) then
Raise_Apllication_Error(-20000,'sorry we cannot perform any DML Operations on Emp because it is break fast Time');
End If;
End;
Create or Replace Trigger MyTrig
Before
Delete or Update or Insert
on Emp
Declare
T number;
Begin
Select to_char(Sysdate,'hh24') into T from Dual;
If (T>=9 and T<=10) then
Raise_Apllication_Error(-20000,'sorry we cannot perform any DML Operations on Emp because it is break fast Time');
End If;
End;
No comments:
Post a Comment
If you Like my blog Spread it and help friends for whom this blog is useful for their career.