Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: [Q] SQL3 trigger modes(before,after,insteadof) difference?

Re: [Q] SQL3 trigger modes(before,after,insteadof) difference?

From: Thomas Bierhance <Bierhance_at_orbital-computer.de>
Date: 17 May 1999 20:31:27 GMT
Message-ID: <37407D2A.2BCA40D1@orbital-computer.de>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US