EXAMPLE:
create or replace trigger mytrig
before - -trigger time
update of sal - -trigger statement
on emp
for each row - -trigger level
Begin
if(:old.sal > :new.sal) then - -trigger restriction
Raise_Apllication_Error(-20000,'sorry we cannot decrease the employee salary');
End If;
End;
NOTE: In the above example old and new are qualifiers which is used to access the values.
create or replace trigger mytrig
before - -trigger time
update of sal - -trigger statement
on emp
for each row - -trigger level
Begin
if(:old.sal > :new.sal) then - -trigger restriction
Raise_Apllication_Error(-20000,'sorry we cannot decrease the employee salary');
End If;
End;
NOTE: In the above example old and new are qualifiers which is used to access the values.
No comments:
Post a Comment
If you Like my blog Spread it and help friends for whom this blog is useful for their career.