MySQL Forums
Forum List  »  Triggers

trigger to copy complete row
Posted by: Bernd Peters
Date: August 30, 2006 01:54AM

Hello,

i need a trigger that will copy the complete row from table_a to table_b in the event that this row ist going to be erased from table_a.

CREATE TRIGGER erase
BEFORE DELETE ON table_a
FOR EACH ROW
INSERT INTO table_b ??????????

I would like to avoid to specify every value using Insert.

Is there something like this, that i can use with the trigger:

INSERT INTO table_b SELECT * from table_a WHERE ...

Thank you very much in advance,
Bernd

Options: ReplyQuote


Subject
Views
Written By
Posted
trigger to copy complete row
14574
August 30, 2006 01:54AM
6994
August 30, 2006 09:32AM
7992
August 30, 2006 10:27PM
5173
August 30, 2006 10:44PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.