MySQL Forums
Forum List  »  Newbie

Delete record with backup
Posted by: paul alcock
Date: September 22, 2010 04:53AM

Is there an easy 1 step command to delete a specific record from a table and move it to a 'backup'
ie A record exists in `Actives` and I want to delete it and backup to `Actives_Deleted`

Currently I'm running three commands
SELECT the record from `Actives`
INSERT the record into `Actives_Deleted`
DELETE the record from `Actives`

The `Actives_Deleted` table does not have to be indexed.



Options: ReplyQuote

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