Instead Of Triggers In Oracle
Hello team,
Greetings for the day..!!
Today we will learn about instead of triggers in Oracle PLSQL.
An Instead of trigger is allow you to update data of table via there view which can not modify directly through DML statements.
Please Note, Instead of view get fired on each transaction which is leads in modification of data.
Instead of trigger can be create for view only rather than for tables.
Whenever you are trying to do DML operations such as insert, update or delete to an non-updateable view at that time oracle will raise an error.
If view is having instead of trigger at that time it will skip the DML statements and will execute other DML statements instead.
Syntax for to create instead of view:
CREATE [OR REPLACE] TRIGGER trigger_name
INSTEAD OF {INSERT | UPDATE | DELETE}
ON view_name
FOR EACH ROW
BEGIN
EXCEPTION
…
END;
You must log in to post a comment.