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 8876365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:11:49+00:00 2026-06-14T19:11:49+00:00

I am trying to create a trigger on addcomments table, which contains a long

  • 0

I am trying to create a trigger on addcomments table, which contains a long coloumn

CREATE OR REPLACE TRIGGER careventCommentssysc
AFTER INSERT 
ON addcomments
FOR EACH ROW
DECLARE
BEGIN
        cargetcomments(:NEW.addcode, :NEW.addcomment,  'INSERTING');
END careventCommentssysc;

when i try to compile this i am getting following error.

ORA-04093, references to column of type LONG are not allowed in triggers.

But i cant change the table column type to other than long.

Please help me if anyone handled this problem earlier.

  • 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-14T19:11:50+00:00Added an answer on June 14, 2026 at 7:11 pm

    EDIT:I think this can be done with Simple compund trigger ,as you are using ORACLE 11g,hence this will work for you.No need for any loopback dblinks.Cheers

    CREATE OR REPLACE TRIGGER careventCommentssysc FOR
       INSERT
       ON t
       COMPOUND TRIGGER
       l_new_long        LONG;
    
       TYPE addcomment_nt
       IS
          TABLE OF addcomments%ROWTYPE
             INDEX BY SIMPLE_INTEGER;
    
       v_addcomment_nt   user_id_nt;
       idx               SIMPLE_INTEGER := 0;
       -- AFTER EACH ROW Section:
    
       AFTER EACH ROW
       IS
       BEGIN
          idx := idx + 1;
          v_addcomment_nt (idx).addcode := :NEW.addcode;
       END
       AFTER EACH ROW;
    
       -- AFTER STATEMENT Section:
    
       AFTER STATEMENT
       IS
       BEGIN
          FOR i IN v_addcomment_nt.FIRST .. v_addcomment_nt.LAST
          LOOP
             EXECUTE IMMEDIATE 'select addcomment 
                                from addcomments 
                                where addcode = :1'
                INTO   l_new_long
                USING v_addcomment_nt (i).addcode;
    
    
             cargetcomments (v_addcomment_nt (i).addcode,
                             :l_new_long,
                             'INSERTING');
          END LOOP;
       END
       AFTER STATEMENT;
    
    END careventCommentssysc;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a simple insert trigger from Products table to ProductPrice
I'm trying to create a trigger that will do the following. After insert on
I'm trying to create a trigger for my table which automatically adds a published
DELIMITER $$ CREATE TRIGGER stock_empty AFTER UPDATE on products FOR EACH ROW DELETE FROM
I am trying to create a trigger wherein it will insert a new row
Hello all I am trying to create an in instead of insert trigger which
Trying to create an Oracle trigger that runs after a table is updated in
I was trying to create a trigger that after inserts in a table, inserts
I am trying to create a trigger which will enter values into a table
I am trying to create a trigger to update another table with a condition

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.