something like:
喜欢的东西:
CREATE TRIGGER
schema1.triggername
AFTER INSERT ON schema2.table
FOR EACH ROW
BEGIN
;
END;
ERROR 1435 (HY000): Trigger in wrong schema
错误1435 (HY000):在错误的模式中触发
1 个解决方案
#1
3
The trigger needs to be in the same schema as the table you are inserting to, but it can access tables in other schemas.
触发器需要与插入到的表相同的模式,但它可以访问其他模式中的表。
Using your example:
用你的例子:
CREATE TRIGGER schema2.triggername
AFTER INSERT ON schema2.the_table
FOR EACH ROW
INSERT INTO schema1.the_table values (...);
#1
3
The trigger needs to be in the same schema as the table you are inserting to, but it can access tables in other schemas.
触发器需要与插入到的表相同的模式,但它可以访问其他模式中的表。
Using your example:
用你的例子:
CREATE TRIGGER schema2.triggername
AFTER INSERT ON schema2.the_table
FOR EACH ROW
INSERT INTO schema1.the_table values (...);