Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: [Q] SQL3 trigger modes(before,after,insteadof) difference?
A "before (row/statement) trigger" is fired before the triggered
statement takes place. e.g. before a row is inserted. You can use this
to make sure that e.g. the inserted row contains all necessary data.
A "after (row/statement) trigger" is fired after the triggered statement took place. e.g. after inserting a row you want to make sure that other data is inserted into another table, where this new data depends on the inserted row.
An "instead of trigger" is used for views, etc. You can imagine a view that does not allow deleting a row, so you use an "instead of trigger" to delete the necessary data in the affected tables manually automatically ;-).
For detailed information try Oracl8 Concepts, Chapter 18, Database Triggers
Thomas Bierhance Received on Mon May 17 1999 - 15:31:27 CDT
![]() |
![]() |