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

  • Home
  • SEARCH
  • 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 6387175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:07:07+00:00 2026-05-25T03:07:07+00:00

The following SQL, upon being executed on an Oracle 9i server, yields the the

  • 0

The following SQL, upon being executed on an Oracle 9i server, yields the the error ” ORA-04098: trigger ‘DBO.WTF_TRIGGER’ is invalid and failed re-validation”.

DROP TABLE "DBO".WTF;

CREATE TABLE "DBO".WTF
(id NUMBER PRIMARY KEY,
name VARCHAR2(30));

CREATE SEQUENCE "DBO".WTF_sequence
START WITH 1
INCREMENT BY 1;

CREATE OR REPLACE TRIGGER "DBO".WTF_trigger
BEFORE INSERT
ON "DBO".WTF
REFERENCING NEW AS NEW
FOR EACH ROW
BEGIN
SELECT "DBO".WTF_sequence.nextval INTO :NEW.id FROM dual;
END;

INSERT INTO "DBO".WTF (name) VALUES ('asd');

Any ideas?

  • 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-05-25T03:07:08+00:00Added an answer on May 25, 2026 at 3:07 am

    As APC points out, it would be helpful to do a SHOW ERRORS in SQL*Plus to print out the errors. The code you posted works perfectly for me if I create a DBO user with appropriate privileges.

    SQL> conn / as sysdba
    Connected.
    SQL> create user dbo identified by dbo;
    
    User created.
    
    SQL> grant connect, resource, unlimited tablespace to dbo;
    
    Grant succeeded.
    
    SQL> conn dbo/dbo
    Connected.
    SQL> DROP TABLE "DBO".WTF;
    DROP TABLE "DBO".WTF
                     *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    
    
    SQL>
    SQL> CREATE TABLE "DBO".WTF
      2  (id NUMBER PRIMARY KEY,
      3  name VARCHAR2(30));
    
    Table created.
    
    SQL>
    SQL> CREATE SEQUENCE "DBO".WTF_sequence
      2  START WITH 1
      3  INCREMENT BY 1;
    
    Sequence created.
    
    SQL>
    SQL> CREATE OR REPLACE TRIGGER "DBO".WTF_trigger
      2  BEFORE INSERT
      3  ON "DBO".WTF
      4  REFERENCING NEW AS NEW
      5  FOR EACH ROW
      6  BEGIN
      7  SELECT "DBO".WTF_sequence.nextval INTO :NEW.id FROM dual;
      8  END;
      9  /
    
    Trigger created.
    
    SQL> INSERT INTO "DBO".WTF (name) VALUES ('asd');
    
    1 row created.
    
    SQL> select * from wtf;
    
            ID NAME
    ---------- ------------------------------
             1 asd
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following SQL: SELECT notes + 'SomeText' FROM NotesTable a Give the error: The
Upon reading INFORMATION_SCHEMA vs sysobjects , I wanted to ask the question: SQL Server
Being newbie in SQL, can some help me adapt this trigger to either sqlite
I am attempting to run the Elmah Sql Server DDL upon database generation in
Within SQL Server 2005, I need to create a table dynamically based upon the
Like the title says, in oracle you can issue the following command in SQL*Plus:
The following SQL SELECT * FROM customers converted to this in LINQ var customers
I've got the following SQL: select * from transaction_log where stoptime like '%2008%' How
Would the following SQL remove also the index - or does it have to
Consider the following SQL: BEGIN TRAN SET TRANSACTION ISOLATION LEVEL READ COMMITTED INSERT Bands

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.