It mentions "from" and "column_name" where column name in this
particular case is "selected". ;-)

@Igor: I thought that sql standard in this case doesn't guarantee that
outer select will return rows in the same order that were enforced in
inner select by "order by", does it?

Pavel

On Wed, Jun 10, 2009 at 11:15 AM, Rand Huck<randh...@gmail.com> wrote:
> Just out of curiosity, where in the syntax documentation does it mention
> "selected from"?
>
> On Wed, Jun 10, 2009 at 10:57 AM, Igor Tandetnik <itandet...@mvps.org>wrote:
>
>> 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
>>
> _______________________________________________
> 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