MySQL Forums
Forum List  »  Newbie

Re: Delete record with backup
Posted by: paul alcock
Date: September 22, 2010 10:33AM

Thanks Chad - every question leads to new learning :)
Never used triggers before, thanks for pointing them out.

Am I on the right track here?

So something like this
CREATE TRIGGER ActiveDeleteCapture
BEFORE DELETE FROM `Actives`
INSERT INTO `Actives_Deleted`
SELECT * FROM `Actives` WHERE `Actives`.`A_key` =OLD `Actives`.`A_key`
;

TIA again.

Paul

Options: ReplyQuote


Subject
Written By
Posted
September 22, 2010 04:53AM
September 22, 2010 07:38AM
Re: Delete record with backup
September 22, 2010 10:33AM
September 22, 2010 01:48PM


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.