Re: Putting an aggregate value in an UPDATE statement...

Поиск
Список
Период
Сортировка
От Leif Biberg Kristensen
Тема Re: Putting an aggregate value in an UPDATE statement...
Дата
Msg-id 201006012315.13986.leif@solumslekt.org
обсуждение исходный текст
Ответ на Re: Putting an aggregate value in an UPDATE statement...  (John Gage <jsmgage@numericable.fr>)
Список pgsql-novice
On Tuesday 1. June 2010 23.03.51 John Gage wrote:
> Thanks.  I tried that _without_ the parentheses around the select
> statement and it didn't work.
>
> At the risk of further displaying ignorance, why are the parens
> necessary, what do they do?

I don't know the technical answer, but as an intuitively derived rule of
thumb: Whenever you need the output of a subselect in an outer query, put the
subselect in parentheses. It becomes second nature after a while.

regards,
--
Leif Biberg Kristensen
http://solumslekt.org/blog/

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

Предыдущее
От: John Gage
Дата:
Сообщение: Re: Putting an aggregate value in an UPDATE statement...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Putting an aggregate value in an UPDATE statement...