Instead-oF Triggers In Database

By Manish Sharma

Instead-oF DELETE Trigger

Welcome to the last tutorial on the “INSTEAD-OF” triggers in Oracle database. Till so far in this series we have seen how to create INSTEAD-OF INSERT trigger and INSTEAD-OF UPDATE trigger. The only trigger that is left now is the INSTEAD-OF DELETE trigger which we will cover in today’s tutorial.

Similar to other instead-of triggers which we have seen in previous tutorial, using INSTEAD-OF DELETE we can override the standard action of Delete DML on a view.

Instead-of Delete trigger Example.

In this example I will again use the View VW_RebellionRider which we created earlier and have consistently used in this Instead-of trigger series so far.

Needless to say that executing DELETE DML on this view will return an error because of its non-updatable nature. Thus the only way to perform DELETE DML on this view is by using an Instead of trigger. Let’s quickly create one.

 INSTEAD OF DELETE ON vw_RebellionRider
On successful execution this trigger will allow you to execute DELETE DML on the view.

This is a very simple example of Instead-of delete trigger intended to teach you the proper way of creating an Instead-of Delete trigger. Hope you enjoyed this quick blog. Click here to share this blog on your twitter.

Also click here to watch and participate in the giveaway on my YouTube channel. Thanks & have a great day!

SQL Script and Presentation used

You can DOWNLOAD SQL script and presentation used in the Video and in this article.

NO SQL Script used in Video and in this article

Do Not Drink & Drive Use My Uber Code "UberRebellionRider"
SignUp using my referral code and get first ride worth $20 FREE

  • Manish Sharma Oracle Rebellion Rider
  • Manish Sharma Oracle certified SQL expert
  • Manish Sharma oracle certified associate
  • Manish Sharma oracle certified professional
  • View Manish Sharma's profile on LinkedIn
  •          View Manish Sharma's profile on LinkedIn