-1

Tell me about mutating (changing) tables in Oracle.

I have read some articles about this, but I understand this in general terms. I would like to better understand mutating tables in Oracle.

I know that it has some problems, but I don't understand what they are or how to resolve them.

Can anybody tell me about this and give some examples?

Chris Martin
  • 30,334
  • 10
  • 78
  • 137
netwer
  • 737
  • 11
  • 33

1 Answers1

1

Hopefully you have gone through the documentation, and that you couldn't understand the practical scenario where a mutating table exception might occur.

Per definition, Mutating table exceptions occur when we try to reference the triggering table in a query from within row-level trigger code.

Similar issue on Asktom, https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:290416059674

A nice article by Tim Hall, http://oracle-base.com/articles/9i/mutating-table-exceptions.php

More importantly, you must read Using Compound DML Triggers to Avoid Mutating-Table Error in the documentation, http://docs.oracle.com/database/121/LNPLS/triggers.htm#CHDFEBFJ

Lalit Kumar B
  • 47,486
  • 13
  • 97
  • 124