What is the trigger restriction on a mutating table?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

What is the trigger restriction on a mutating table?

Rating:

Reading and writing data into tables by using database triggers are subject to a restriction. The restriction is that the session that issues a triggering statement cannot query (SELECT) or modify (INSERT, UPDATE, DELETE, etc.) a mutating table. A mutating table is a table that is currently being modified by an INSERT, UPDATE, or DELETE statement, or a table that might be updated by the effects of a declarative DELETE CASCADE referential integrity constraint. This restriction prevents a trigger from seeing an inconsistent set of data.

The restriction applies to all row triggers and to those statement triggers that are fired as a result of a DELETE CASCADE event. Any table referencing to a mutating table with a FOREIGN KEY constraint is also a mutating table. However, views being modified through an INSTEAD OF trigger are not considered mutating.

When a trigger encounters a mutating table, the following events occur:

  • A runtime error occurs.

  • Effects of the trigger action and triggering statement are rolled back.

  • Control is returned to the user or application.

  • Rating:



    Other articles

    Click here to Article home

     
    uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
    MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
    Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
    © 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.