triggers to copy row from table a to table b, then delete from table a?
646208Jun 24 2008 — edited Jun 25 2008hi 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;