PL/SQL program for tracking operation on a emp table.
Create or Replace Trigger EmpTracking
Before Insert or Delete or Update on Emp
For each row
Declare
Begin
If Inserting then
/*Can perform operations just before record is inserted into the emp table*/
Else if Updating then
/*Can perform operations just before record is about to be updated*/
Else if Deleting then
/*Can perform operations just before record is about to be deleted*/
End If
End EmpTracking
Create or Replace Trigger EmpTracking
Before Insert or Delete or Update on Emp
For each row
Declare
Begin
If Inserting then
/*Can perform operations just before record is inserted into the emp table*/
Else if Updating then
/*Can perform operations just before record is about to be updated*/
Else if Deleting then
/*Can perform operations just before record is about to be deleted*/
End If
End EmpTracking
0 comments:
Post a Comment