Hi,

if I attach a database to itself the trigger in the second db seem not 
to work as expected (as I wrongly expected? .-): Does anyone no why and 
how I could work around this?

sqlite3 adb
.headers on
create table a (
        pk integer primary key );
create table b (
        pk integer primary key,
        fk integer constraint fk_c references a (pk) on delete cascade on 
update cascade);
.genfkey --exec
insert into a values (1);
insert into b values (1, 1);
--test trigger
update a set pk=2; -- ok
select * from b;
.exit


sqlite3 adb
.headers on
attach database adb as bdb;
--test trigger
update bdb.a set pk=3; -- fails
update a set pk=3; -- ok
select * from bdb.b;
select * from b;
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to