Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Preventing record deletion with “INSTEAD OF DELETE” triggers

643309Jun 9 2008 — edited Jun 9 2008
Preventing record deletion

I have to migrate an MS SQL 2005 database to an ORACLE 9i database. In MS SQL we use “INSTEAD OF DELETE” triggers on tables to prevent record deletion. Instead of a delete we perform an update. Changing the application code is not an option.

According to the ORACLE documentation instead of triggers can only be applied to views.

I tried using a simple BEFORE DELETE trigger to raise an application error to prevent the deletion, but the application cannot handle the exception raised. And even if the application could handle the raised exception. I would still have to perform a update.

Question: What is the equivalent for an instead of delete trigger on a table in ORACLE 9i? (Specific do an update instead of delete)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 7 2008
Added on Jun 9 2008
19 comments
2,436 views