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!

triggers to copy row from table a to table b, then delete from table a?

646208Jun 24 2008 — edited Jun 25 2008
hi all its me again.... more trouble with trigers

now with this one im not sure if its even possible. i have 3 tables... BOOK_INFO, BOOK_IN_INFO and BOOK_OUT_INFO.

right so what i need to happen is as follows:-

STEP1) if i enter data into BOOK_INFO i need a copy of that data to be passed to BOOK_IN_INFO.

STEP2) i i then enter the pk of that record into BOOK_OUT_INFO i need for the data to be copied from BOOK_IN_INFO into BOOK_OUT_INFO and DELETED from BOOK_IN_INFO.
(this is for when the book is rented out)

STEP3) i enter the pk of the record into BOOK_IN_INFO and the data is passed from BOOK_OUT_INFO back to BOOK_IN_INFO
(for when the book is returned)

now this seems a long and conveluted way to do this.... can anyone suggest a more simple way to do it? the only way i can think of is to use several triggers... now i dont know how to create procedures.... so could someone help me

THANKS ALOT
RMMO

i have some triggers in mind i will post them right after this;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2008
Added on Jun 24 2008
9 comments
2,857 views