The not-in subselect could be expensive, depending on table size. If it turns out to be expensive, you might consider reference counting.
----- Original Message ----- From: "Dennis Volodomanov" <[email protected]> To: "General Discussion of SQLite Database" <[email protected]> Sent: Wednesday, September 09, 2009 5:17 PM Subject: Re: [sqlite] One more SQL statement question >> sqlite> create trigger UpdateData after update on tablea begin >> ...> delete from tableb where id=old.refb and id not in ( select >> refb from tablea ); > > Yep, that's exactly what I need. > > Thank you! > > Dennis > > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

