MySQL Forums
Forum List  »  Triggers

Re: Creating trigger :: Solved - For whom that might interest
Posted by: Jorge Ferreira
Date: June 06, 2006 07:11AM

My SQL was very badly created.
Here is a script working:

DELIMITER &&

CREATE TRIGGER trUPDEmp AFTER UPDATE ON empresa
FOR EACH ROW BEGIN
IF NEW.formacao = 1 THEN
INSERT INTO formacao.empresa (nome_empresa, id_empresa) VALUES (NEW.nome_empresa,NEW.id);
END IF;
END;
&&

DELIMITER ;

Options: ReplyQuote


Subject
Views
Written By
Posted
2582
June 06, 2006 03:23AM
Re: Creating trigger :: Solved - For whom that might interest
1709
June 06, 2006 07:11AM


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.