MySQL Forums
Forum List  »  Triggers

Re: TRIGGER BEFORE DELETE syntax error
Posted by: William Chiquito
Date: February 22, 2007 05:20AM

Hi Edi,

trigger:
DELIMITER $$

DROP TRIGGER `delete_personne`$$

CREATE TRIGGER `delete_personne` BEFORE DELETE on `personne`
FOR EACH ROW
BEGIN
	INSERT INTO histo_personne SELECT OLD.initialespers,OLD.nompers,OLD.prenompers,OLD.datenaisspers,OLD.photopers,OLD.validepers,now();
END$$

DELIMITER ;
works correctly.



Edited 1 time(s). Last edit at 02/22/2007 05:20AM by William Chiquito.

Options: ReplyQuote


Subject
Views
Written By
Posted
18809
February 14, 2007 09:30AM
6140
February 22, 2007 03:37AM
Re: TRIGGER BEFORE DELETE syntax error
6553
February 22, 2007 05:20AM


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.