Re: division by zero issue

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: division by zero issue
Дата
Msg-id 20040915210703.GB12624@svana.org
обсуждение исходный текст
Ответ на Re: division by zero issue  (Greg Donald <destiney@gmail.com>)
Список pgsql-general
On Wed, Sep 15, 2004 at 02:10:45PM -0500, Greg Donald wrote:
> On Wed, 15 Sep 2004 12:54:07 -0600, Guy Fraser <guy@incentre.net> wrote:
> > This might work better.
>
> Thanks, I got it working finally.  It wouldn't go without any fields
> in the second SELECT, but I added them and now it works.
>
> Where can I find docs for the 'as intermediate' part of this query.  I
> never heard of it and can't seem to find it in the manual other than
> it's listing in the SQL keywords table.  I see what it does but still
> want to read the docs about it.

It's a called subquery. Everything in the brackets is a query which
produces a result and is aliased to the name "intermediate". The outer
query can then use it as a source table like any other table.

Ofcourse, optimisation might mean it gets optimised away, but that's
the basic idea...

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: what is flushed?
Следующее
От: daniel
Дата:
Сообщение: Re: psql + autocommit