MySQL Trigger über zwei Datenbanken
USE db_1;
DELIMITER |
CREATE TRIGGER test
BEFORE INSERT ON table_1
FOR EACH ROW
INSERT INTO db_2.table_2 SET table_2.field_2 = NEW.field_1;
|
USE db_1;
DELIMITER |
CREATE TRIGGER test
BEFORE INSERT ON table_1
FOR EACH ROW
INSERT INTO db_2.table_2 SET table_2.field_2 = NEW.field_1;
|