UPDATE & LIMIT together?

Поиск
Список
Период
Сортировка
От tp
Тема UPDATE & LIMIT together?
Дата
Msg-id 20020828160929.GL20155@emaze.net
обсуждение исходный текст
Ответы Re: UPDATE & LIMIT together?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-sql
Hi

I want to SELECT at max. 10 rows and SET a variable for the
select 10 rows with the same query.

Under mysql i can use:
UPDATE table SET uniq_iq=12345 LIMIT 10
SELECT * FROM table WHERE uniq_id=1234;

This is not supported by postgres.

Is there some easy solution that does not require locking?


-tp

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

Предыдущее
От: "Ligia Pimentel"
Дата:
Сообщение: Re: Problems with version 7.1, could they be fixed in 7.2?
Следующее
От: Kevin Brannen
Дата:
Сообщение: Re: Retrieving the new "nextval" for primary keys....