Insert fixed values through trigger and store tried values
venkatDec 6 2007 — edited Dec 6 2007Hi,
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.