Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Insert fixed values through trigger and store tried values

venkatDec 6 2007 — edited Dec 6 2007
Hi,
I create a trigger to insert fixed values into the 2 cloumns table km. I want to store
into another table, what are the values i tried to insert into the table km.

I wrote a trigger to insert a fixed values:

CREATE OR REPLACE TRIGGER t1
BEFORE INSERT ON SCOTT.KM
FOR EACH ROW
BEGIN
:NEW.NO := 1000;
:NEW.NAME := 'Oracle';
END;
/
insert into km values(112,'Venkat');
1 row created.
commit;
SQL> select * from km;

NO NAME
---------- ----------
1000 Oracle

I want to store (112,'Venkat'); into another table km2.

What is the solution. Could U please guide me.

Warm Regards,
Venkat.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 3 2008
Added on Dec 6 2007
8 comments
261 views