views:

28

answers:

1

something like:

CREATE TRIGGER
       schema1.triggername
AFTER INSERT ON schema2.table
FOR EACH ROW
BEGIN
       ;
END;

ERROR 1435 (HY000): Trigger in wrong schema

A: 

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 (...);
Ike Walker
yes, thanks but I want the trigger (all the triggers actually) in a different schema than the tables.
vulkanino