Rand Huck wrote:
> In addition to what was already said, if you absolutely to omit the
> 'name' from the final result set, you should be able to put the
> result of the union in a temporary table.

Or else add an extra layer of indirection:

select id,  url,  selected from (
    SELECT id,  url,  selected, name FROM db1.test  UNION
    SELECT id,  url,  selected, name FROM db2.test
    ORDER BY name ASC, id DESC LIMIT 100
);

This essentially instructs SQLite to create a temporary table for the 
duration of this statemet (also known as ephemeral tables).

Igor Tandetnik 



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

Reply via email to