Newsletter Subscription | Glossary | Contact Us
Home > All Categories > Oracle > SQL and PLSQL > Oracle 11G - Follows in Trigger
Question Title Oracle 11G - Follows in Trigger
Authored by: Patrick Barel
Viewed: 306 times so far

I’ve seen a presentation on the 11G new features from Alex and Lucas at Amis . One of the questions posed there was when you are using the new follows option in triggers, what would happen if you have two triggers following the same one. A bit like the way it’’s done right now.

Suppose you have multiple trigger on the same event on the same table, for instance when you have a packaged application where you are not allowed to change any of the code. But you want to add your own code. Or you have some standard triggers that you generate using for example CodeGen. If you add a trigger to an event that already has a trigger on it, there is no way of knowing when this is executed, before or after the existing trigger. If you rely on values that may be changed in the first trigger there was no way to be sure this trigger had been fired before your code is executed.

In Oracle 11G you now have the possibility to add the follows option to a trigger, to make sure the code is executed after the original trigger. (from the documentation at Oracle)

CREATE [ OR REPLACE ] TRIGGER [schema.] trigger
              { simple_dml_trigger | compound_dml_trigger | non_dml_trigger }
              [ FOLLOWS [schema.] trigger [[schema.] trigger]…]
              [ ENABLE
        |
         DISABLE ]
              [ WHEN (condition) ]
              trigger_body

Read the rest of this article at http://bar-solutions.com/wordpress/?p=201
Click Here to View all the questions in SQL and PLSQL category.
File Attachments File Attachments
There are no attachment file(s) related to this question.
User Comments User Comments
There are no user comments for this question. Be the first to post a comment. Click Here
Post Comment Add a Comment
Email Address:
Comment/Message
Verify Code

Post Comment How helpful was this article to you?
Related Questions Related Article
  1. Oracle 11G - Compound Trigger
  2. Parameters in Oracle
  3. Oracle 11G - Virtual Columns (Dates)
  4. Constraints and Row Level Security
  5. Union vs Union All
  6. WITH Clause
  7. Ansi SQL vs Oracle SQL
  8. Simple comparison SQL
  9. Tri-state boolean
  10. Cascading Delete
  11. Conditional Compilation...
  12. Oracle 11G - Virtual Columns
  13. Recursive programming.
  14. Handy date functions
  15. A boolean property that's really an integer.
  16. Ordering Results
  17. Oracle errors
  18. Shrinking tablespaces
  19. Testing Rulegen using Codetester
  20. Functions as default values
  21. By position or by name.
  22. Defaults
  23. Open cursors
Article Information Additional Information
Article Number: 369
Created: 2008-08-04 10:34 PM
Rating 5 Stars
 
Article Options Article Options
Print Question Print this Question/Article
Email Question Email this Question/Article to Friend
Export to MS Word Export to MS Word
Bookmark Article
del.icio.us Bookmark del.icio.us Bookmark
Digg It Digg It
Furl It Furl It
Subscribe to Article Subscribe to Article
 
Language Translation Language Translation
 
Search Knowledge Base Search Knowledge Base