UPDATE & LIMIT together? - Mailing list pgsql-sql

From tp
Subject UPDATE & LIMIT together?
Date
Msg-id 20020828160929.GL20155@emaze.net
Whole thread Raw
Responses Re: UPDATE & LIMIT together?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List 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 by date:

Previous
From: "Ligia Pimentel"
Date:
Subject: Re: Problems with version 7.1, could they be fixed in 7.2?
Next
From: Kevin Brannen
Date:
Subject: Re: Retrieving the new "nextval" for primary keys....