MySQL Forums
Forum List  »  Triggers

ERROR 1442
Posted by: Weslley Eduardo
Date: November 07, 2019 10:09AM

My problem is:

When I insert into base1.Client I want to insert into base2.Client.

When I insert into base2.Client, I want to insert into base3.Client.

When I insert into base3.Cliente I want to insert into base2.client.

When I insert into base2.Client, I want to insert into base1.Client.


But this error don't let me go...

Script:

INSERT INTO banco3.Clientes VALUES (6,'RoseMel', '1998-05-08', '48381856' '4539-6', 'ananana', 'oqe?', '162', 'sasnaush', 'qsjqijqiwj',
'SP', '13720000');


DELIMITER $$

CREATE TRIGGER insereBanco3 AFTER INSERT
ON banco3.clientes FOR EACH ROW

BEGIN
INSERT INTO banco2.cli(id, nome, dat_nascimento, cpf, rg, endereco, numero, bairro, cidade, estado, cep)
VALUES(NEW.id, NEW.nome, NEW.dat_nascimento, NEW.cpf, NEW.rg, NEW.endereco, NEW.numero, NEW.bairro, NEW.cidade, NEW.estado, NEW.cep);
END;

Options: ReplyQuote


Subject
Views
Written By
Posted
ERROR 1442
458
November 07, 2019 10:09AM
219
November 07, 2019 11:17AM


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.