Plz do abide to our Terms & Condition:

    • Do not paste URL Links directly in any content instead post them as Hyperlink inside a text.
       
    • To post a Link directly use instead Bookmark.
       
    • If we find anyone posting beyond the warning we will immediately terminate your account without any warning. 

ORA-04088: error during execution of trigger

    Meril Jeffery John.J
    • 201 views
    • 0/5 (0 votes)
    Asked by Meril Jeffery John.J Answers (1)

    I can understand there is an error in runtime but cant get what it is causing this error

    Answers (1)

      • Arun prasad
        By Arun prasad

        Oracle recommends that you use triggers to constrain data only where you can't use (among other things) CHECK constraints. Since this is actually simpler to do, you should probably use that in this case;

        CREATE TABLE Actor (
          id int, 
          name varchar(32), 
          birthdate date, 
          deathdate date, 
          CONSTRAINT birth_death CHECK (deathdate > birthdate)
        );

        This will enforce your business rule without an extra trigger.