Help with a complex Update

Поиск
Список
Период
Сортировка
От Orion
Тема Help with a complex Update
Дата
Msg-id 9rv960$1des$1@news.tht.net
обсуждение исходный текст
Ответы Re: Help with a complex Update  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Re: Help with a complex Update  ("Josh Berkus" <josh@agliodbs.com>)
Список pgsql-sql
I have a table of users and a table of user_actions.
I'd like to have a first_action column in the user table. 

How would I go about updating that info.

I'd immagine it'd be something like this:

update user_info set first_action = (select min(action_timestamp) from 
action_info where user_id = ?? current user id ??);

Is this possible or do I have to make an external for loop?
       Orion



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

Предыдущее
От: sharmad@goatelecom.com
Дата:
Сообщение: debugging
Следующее
От: Haller Christoph
Дата:
Сообщение: table permissions II