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!

How to copy a record into other table in a trigger

579029May 23 2007 — edited May 25 2007
Hi
I am new PL/SQL programmer. Need to do next
When user table add a new record or update, copy the record and modify time to a backup table.But I don't know table structure (column name, type etc.).
So first need to create a procedure that can create back table for every table (or view). The structure is original table + date.
Second I must create a trigger can copy a record that be add or updated to this backup table.
I can not do "insert into XXX VALUES( :new.id,:new.name, sysdate);". Column name should be parameters.
Any idea, example will very helpful.
Thanks first!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 22 2007
Added on May 23 2007
16 comments
2,228 views