Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle trigger HHHEEELLLPP !

Re: Oracle trigger HHHEEELLLPP !

From: Keith Jamieson <pdkj02_at_email.mot.com>
Date: Mon, 25 Jan 1999 13:11:56 +0000
Message-ID: <36AC6D9B.29EDC289@email.mot.com>


If you ever add a column to your table the trigger will then fail. Are
you sure you want to do this???. It is not very good practice. I suggest
specifying the column names

Pedro Ramos wrote:

Hello all,

I have an INSERT trigger on a table that has about 100 columns, when a
row is inserted in the table (TABLEA) I need to insert the same row in
another table (TABLEB).
I don't want to use column names for the insertion, I want to use
something of the kind :

INSERT INTO TABLEB SELECT * FROM :NEW

or

INSERT INTO TABLEB SELECT * FROM TABLEA WHERE KEY=:NEW.KEY

But neither of these work, can you give me some help !

Pedro Ramos

PS - The trigger is an after trigger.
I don't want to do something like :

INSERT INTO TABLEB (COL1,COL2,COL3,....) VALUES
(:NEW.COL1,:NEW.COL2,:NEW.COL2,...)

  Received on Mon Jan 25 1999 - 07:11:56 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US