Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9205113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:52:33+00:00 2026-06-17T23:52:33+00:00

I get ORA-04091 Error while inserting data into table A. Table A records are

  • 0

I get ORA-04091 Error while inserting data into table A. Table A records are refferencing other records in the same table 1:N.
Father records have fk_id = null and child records have fk not null.

create or replace trigger TRBI_A 
BEFORE INSERT ON A
for each row
BEGIN
  IF :new.fk_id IS NOT NULL then
     UPDATE A SET actualTS = CURRENT_TIMESTAMP WHERE id = :new.fk_id;
  END IF;
END;

ORA-04091: table name is mutating, trigger/function may not see it

The problem could is probably caused by trigger which tried to modify or query a table that is currently being modified by the statement that fired the trigger.
Does anyone know how to modify the trigger to have it correct?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:52:35+00:00Added an answer on June 17, 2026 at 11:52 pm

    You know what the problem is, so just read your code a little: you update the same table you are putting the trigger on.

    I guess in your case you just need to put :NEW.actualTS:=current_timestamp, without using the update statement.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For past some time I have noticed that we get ORA-00054 error while trying
I get error: ORA-06575: Package or function GET_CONC_NAMES is in an invalid state When
I have a trigger which I'm trying to use to update the same table
I get ORA-00904 'c' invalid identifier error. What is wrong with this alias ?
I exported some data from my database table into sql file as insert statements.
When i am generating a report, I get java.sql.SQLException: ORA-08103: object no longer exists.Code
Get class from div inside an li and add to the same li. The
I have a query like INSERT INTO sid_rem@dev_db (sid) select sid from v$session Now,
> ALTER PACKAGE blah COMPILE; (wait about 10 minutes) > ORA-04021: timeout occurred while
The following query generates the error below in 10g: select DBMS_METADATA.GET_DDL('TABLE','TEST_TABLE','TEST') from dual; Got:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.