Lab 17.3 Mutating Table Issues

Lab Objective

After this Lab, you will be able to:

Understand Mutating Tables

A table having a DML statement issued against it is called mutating table. For a trigger, it is the table on which this trigger is defined. If a trigger tries to read or modify such a table, it causes a mutating table error. As a result, a SQL statement issued in the body of the trigger may not read or modify a mutating table.

Note that prior to Oracle 8i, there was another restriction on the SQL statement issued in the body of a trigger that caused a different type of error called a constraining table error. A table read from for a referential integrity constraint is called a constraining table. So an SQL statement issued in the body ...

Get Oracle® PL/SQL® Interactive Workbook, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.