MySQL Forums
Forum List  »  Newbie

Re: Delete record with backup
Posted by: Chad Bourque
Date: September 22, 2010 01:48PM

Paul,

Not quite. I think it would look a little more like this:

delimiter $$

create trigger ActiveDeleteCapture before delete on Actives
  for each row begin
    insert into Actives_Deleted
       values (old.col1, old.col2, old.col3);
  end;
$$

delimiter ;

The syntax may not be 100% right, it's been a while since I wrote a trigger. ;-)

HTH,
Chad

Options: ReplyQuote


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