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" <denn...@conceiva.com>
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
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
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to