The following example shows an INSTEAD OF trigger for inserting new employee row into the emp_vw view. The CREATE VIEW statement creates the emp_vw view by joining the two tables. The trigger adds the corresponding new rows into the emp and dept table respectively for a specific employee.
Now, insert the values into the emp_vw view. The insert action inserts a new row and produces the following output:
Similarly, if you specify UPDATE or DELETE statement, the trigger will perform the appropriate actions for UPDATE or DELETE events.