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

From: Bret Fledderjohn <freelancer317(at)gmail(dot)com>
To: John Gage <jsmgage(at)numericable(dot)fr>
Cc: NOVICE Postgres elist <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Putting an aggregate value in an UPDATE statement...
Date: 2010-06-01 20:45:27
Message-ID: AANLkTinI-mUlozkb3NuTT4OpmEymiQwVgrH-V0iUzDXz@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

See Below:

On 1 June 2010 16:28, John Gage <jsmgage(at)numericable(dot)fr> wrote:

> This statement:
>
>
> UPDATE question_choices SET total_rows = count(*) from care_lesson
>

UPDATE question_choices SET total_rows = (select count(*) from care_lesson);

--
Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice

--

- Bret
____________________________________________
"Why should I fret in microcosmic bonds
That chafe the spirit, and the mind repress,
When through the clouds gleam beckoning beyonds
Where shining vistas mock man's littleness?"
- H.P. Lovecraft, "Phaeton" (1918)

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Andrej 2010-06-01 20:47:46 Re: Invitation to connect on LinkedIn
Previous Message Mariateresa L 2010-06-01 20:33:51 Re: sql files in psql ?