Re: Help pls with UPDATE

Поиск
Список
Период
Сортировка
От Guy Rouillier
Тема Re: Help pls with UPDATE
Дата
Msg-id CC1CF380F4D70844B01D45982E671B239E8C22@mtxexch01.add0.masergy.com
обсуждение исходный текст
Ответ на Help pls with UPDATE  (go KEY802207 <go@ugnn.ru>)
Ответы Re: Help pls with UPDATE
Список pgsql-general
go KEY802207 wrote:
> Hi, pgsql-general.
>
>   Tell me please, how to update a set of rows using order-
>   something like :
>
>   update my_table set counter1=nextval('my_seq') order by counter2 ;

The way this is usually done is to issue a SELECT with an ORDER BY
clause, then update the rows that are returned.  Many DBMSs have a
SELECT FOR UPDATE and then UPDATE WHERE CURRENT OF CURSOR, but a quick
read of the documentation doesn't list such constructs for PostgreSQL,
so if not you'll need to use separate statements.

--
Guy Rouillier


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

Предыдущее
От: Alex Turner
Дата:
Сообщение: Re: SQL injection
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: Help pls with UPDATE