• Hugo Kornelis - Sunday, May 21, 2017 3:03 AM

    Jeff Moden - Saturday, May 20, 2017 2:33 PM

    I just posted a plea and a link to this post on "the thread".  I'd love to see "BEFORE Triggers" become a reality instead of those gosh-awful "Instead Of" triggers.  I have little love in general for Oracle but this one of those things that Oracle absolutely did right from the git.  It would make writing audit triggers a whole lot easier to prevent unnecessary duplication in audit tables, which become some of the biggest tables of them all.

    Another upvote. I like the idea in the item, allthough I'd like just implementing BEFORE triggers even better.
    However, I do not share your dislike for INSTEAD OF triggers. They are a great tool for some specific purposes. I have used them to expose views as if they were the base tables, hiding the actual base tables, and allowing full updatability even when SQL Server itself would consider the view non-updatable or misunderstand how to change the base tables to correspond to the actual change,

    [/quote]

    You misunderstand my dislike for "Instead Of" triggers.  As you say, they ARE great for specific purposes.  A perfect example is when the target of an insert is actually an updateable view built for one reason or another.  Still, you have to control everything there instead of just what you need to control, whatever that may be.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)