Re: [Fwd: Re: no ORDER BY in subselects?]

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: [Fwd: Re: no ORDER BY in subselects?]
Дата
Msg-id web-1091623@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на Re: [Fwd: Re: no ORDER BY in subselects?]  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-sql
Phillip,

> The main reason I use them is to find the 'next' or
> 'previous' record in a
> list (eg. next date, next ID). eg.
> The fact that Dec RDB, Oracle and SQL/Server all allow it
> probably means
> that there is a reasonable user base out there who think
> it's a good idea.

Makes sense.  Fortunately, in PGSQL there's another function
to grab the next ID.  As for dates ... hmmm... there we come
up against the "no subselect in FROM" bug, don't we?  I get
the problem.

(Personally, I've always SELECTed into a variable in MSSQL
rather than using the syntac you're suggesting.  I've found
that the order that the MSSQL chooses to execute query
segments in can cause some unpredicatble results ... )

-Josh Berkus


В списке pgsql-sql по дате отправления:

Предыдущее
От: root
Дата:
Сообщение: how to store a query, that results in a table
Следующее
От: Tom Lane
Дата:
Сообщение: Re: sql query not using indexes