Android – creating trigger across different databases

androidmysqlsqlite

Is there any way to create triggers on different databases? my requirement is like:-

 database: a1.db consist table: t1
 database:a2.db  consist table: t2

now i have to use trigger on t1 (whenever any delete and update operation) happens on t1 a value has to be inserted into t2.

waiting for your feedback…

Best Solution

I can only speak for MySQL, but you should be able to do something like:

CREATE TRIGGER ad_t1 AFTER DELETE ON `a1.db`.t1
FOR EACH ROW
INSERT INTO `a2.db`.t2 VALUES (...)
Related Question