Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    1

    Unanswered: trigger referencing new table

    I want to use a statement-level trigger for "after insert". There should be a table of tuples that is inserted, which is the "new table" according to SQL standard. How could I reference it in Oracle? I know there are functions to reference the new rows in row-level trigger, but not for statement-level trigger. I have looked for many documents and articles but none of them mention this. Does Oracle have this function? Thank You.

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    No, it doesn't

  3. #3
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    To be more precisely: the :NEW record (!) is only available in row-level triggers.

    What are you trying to do?
    Why can't you use a row-level trigger if you need to check the new values?

    Btw: where did you read that there is a NEW table in the SQL standard defined?
    I didn't even know that triggers are specified in the SQL standard.

  4. #4
    Join Date
    Mar 2007
    Posts
    623
    Just adding the corresponding part of documentation.
    Oracle Support for Optional Features of SQL/Foundation:2003
    T211, Basic trigger capability
    Oracle's triggers differ from the standard as follows:
    ***
    * Oracle does not support OLD TABLE and NEW TABLE; the transition tables specified in the standard (the multiset of before and after images of affected rows) are not available.
    ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •