Suppose I have following schema:

t1.db:
create table t1 (id integer, foo text);

t2.db:
create table t2 (id integer, foo text);

And I want that if I load t1 and attach t2, then deleting a row from t1 
would cause delete on row of t2 with same id. I try to do something like 
this:

CREATE TRIGGER tdel  AFTER DELETE ON t1 
begin 
  delete from t2 where id=old.id; 
end;

but when doing actual delte it looks for main.t2 and not for t2. Do I 
understand right that triggers can work only with the database of the 
triggering table? 
-- 
Stanislav Malyshev, Zend Products Engineer   
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115

Reply via email to