I would like to create a TRIGGER AFTER UPDATE which copy the row that has just been updated in TABLE_1 to the TABLE_2.
This code raise an error after updated more than one row : SQL Error (1062): Duplicate entry '1' for key 'PRIMARY'
I know this code is not right but I just don't know how to manipulate the row that has been updated.
CREATE DEFINER=`companyERP`@`%` TRIGGER `trigger` AFTER INSERT ON `Table_1`
FOR EACH ROW BEGIN
INSERT INTO Table_2 SELECT *
FROM Table_1;
END