Why not make it this way: select 'database1', lists.* from database1.lists union all select 'database2', lists.* from database2.lists;
This way you will know exactly which lists persist in which database. Pavel On Sat, Aug 15, 2009 at 10:57 AM, Andrew Gatt<a.g...@btinternet.com> wrote: > Simon Slavin wrote: >> On 15 Aug 2009, at 3:12pm, Andrew Gatt wrote: >> >> >>> but by my scheme you can't be sure if the list_1 table exists in >>> database2, >>> >> >> Add a column to your 'lists' tables which says which database they're >> part of. So every row of the database will have the same value. >> >> >> > Unfortunately the database names change (they are assigned as and when > the storage is attached) and also the list will only return all the > items if all the databases are present, a smaller subset otherwise. So > i'd still have to check if the tables in the databases existed - wouldn't i? > > Andrew > > _______________________________________________ > 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