MySQL Forums
Forum List  »  Newbie

Re: Delete record with backup
Posted by: Chad Bourque
Date: September 22, 2010 07:38AM

Paul,

The select can be included as part of the insert (see insert select syntax in the manual). That would get you down to two statements. You could put those two statements into a stored procedure, so then it would be one call. Or you could create a trigger on delete to insert the deleted row into the Actives_Deleted table. I'd probably go the trigger route.

HTH,
Chad

Options: ReplyQuote


Subject
Written By
Posted
September 22, 2010 04:53AM
Re: Delete record with backup
September 22, 2010 07:38AM
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.